mirror of
https://github.com/boostorg/function.git
synced 2026-01-28 19:22:09 +00:00
Compare commits
7 Commits
feature/re
...
boost-1.82
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
65bbbbc359 | ||
|
|
f1535c3b00 | ||
|
|
141b4331e4 | ||
|
|
69eae72f9b | ||
|
|
d268283044 | ||
|
|
361e07808f | ||
|
|
45e1ddeabc |
225
.github/workflows/ci.yml
vendored
225
.github/workflows/ci.yml
vendored
@@ -19,27 +19,30 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- toolset: gcc-4.8
|
- toolset: gcc-4.8
|
||||||
cxxstd: "03,11"
|
cxxstd: "03,11"
|
||||||
os: ubuntu-18.04
|
os: ubuntu-latest
|
||||||
|
container: ubuntu:18.04
|
||||||
install: g++-4.8-multilib
|
install: g++-4.8-multilib
|
||||||
address-model: 32,64
|
address-model: 32,64
|
||||||
- toolset: gcc-5
|
- toolset: gcc-5
|
||||||
cxxstd: "03,11,14,1z"
|
cxxstd: "03,11,14,1z"
|
||||||
os: ubuntu-18.04
|
os: ubuntu-latest
|
||||||
|
container: ubuntu:18.04
|
||||||
install: g++-5-multilib
|
install: g++-5-multilib
|
||||||
address-model: 32,64
|
address-model: 32,64
|
||||||
- toolset: gcc-6
|
- toolset: gcc-6
|
||||||
cxxstd: "03,11,14,1z"
|
cxxstd: "03,11,14,1z"
|
||||||
os: ubuntu-18.04
|
os: ubuntu-latest
|
||||||
|
container: ubuntu:18.04
|
||||||
install: g++-6-multilib
|
install: g++-6-multilib
|
||||||
address-model: 32,64
|
address-model: 32,64
|
||||||
- toolset: gcc-7
|
- toolset: gcc-7
|
||||||
cxxstd: "03,11,14,17"
|
cxxstd: "03,11,14,17"
|
||||||
os: ubuntu-18.04
|
os: ubuntu-20.04
|
||||||
install: g++-7-multilib
|
install: g++-7-multilib
|
||||||
address-model: 32,64
|
address-model: 32,64
|
||||||
- toolset: gcc-8
|
- toolset: gcc-8
|
||||||
cxxstd: "03,11,14,17,2a"
|
cxxstd: "03,11,14,17,2a"
|
||||||
os: ubuntu-18.04
|
os: ubuntu-20.04
|
||||||
install: g++-8-multilib
|
install: g++-8-multilib
|
||||||
address-model: 32,64
|
address-model: 32,64
|
||||||
- toolset: gcc-9
|
- toolset: gcc-9
|
||||||
@@ -65,27 +68,30 @@ jobs:
|
|||||||
- toolset: clang
|
- toolset: clang
|
||||||
compiler: clang++-3.9
|
compiler: clang++-3.9
|
||||||
cxxstd: "03,11,14"
|
cxxstd: "03,11,14"
|
||||||
os: ubuntu-18.04
|
os: ubuntu-latest
|
||||||
|
container: ubuntu:18.04
|
||||||
install: clang-3.9
|
install: clang-3.9
|
||||||
- toolset: clang
|
- toolset: clang
|
||||||
compiler: clang++-4.0
|
compiler: clang++-4.0
|
||||||
cxxstd: "03,11,14"
|
cxxstd: "03,11,14"
|
||||||
os: ubuntu-18.04
|
os: ubuntu-latest
|
||||||
|
container: ubuntu:18.04
|
||||||
install: clang-4.0
|
install: clang-4.0
|
||||||
- toolset: clang
|
- toolset: clang
|
||||||
compiler: clang++-5.0
|
compiler: clang++-5.0
|
||||||
cxxstd: "03,11,14,1z"
|
cxxstd: "03,11,14,1z"
|
||||||
os: ubuntu-18.04
|
os: ubuntu-latest
|
||||||
|
container: ubuntu:18.04
|
||||||
install: clang-5.0
|
install: clang-5.0
|
||||||
- toolset: clang
|
- toolset: clang
|
||||||
compiler: clang++-6.0
|
compiler: clang++-6.0
|
||||||
cxxstd: "03,11,14,17"
|
cxxstd: "03,11,14,17"
|
||||||
os: ubuntu-18.04
|
os: ubuntu-20.04
|
||||||
install: clang-6.0
|
install: clang-6.0
|
||||||
- toolset: clang
|
- toolset: clang
|
||||||
compiler: clang++-7
|
compiler: clang++-7
|
||||||
cxxstd: "03,11,14,17"
|
cxxstd: "03,11,14,17"
|
||||||
os: ubuntu-18.04
|
os: ubuntu-20.04
|
||||||
install: clang-7
|
install: clang-7
|
||||||
- toolset: clang
|
- toolset: clang
|
||||||
compiler: clang++-8
|
compiler: clang++-8
|
||||||
@@ -132,13 +138,24 @@ jobs:
|
|||||||
os: macos-12
|
os: macos-12
|
||||||
|
|
||||||
runs-on: ${{matrix.os}}
|
runs-on: ${{matrix.os}}
|
||||||
|
container: ${{matrix.container}}
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup container environment
|
||||||
|
if: matrix.container
|
||||||
|
run: |
|
||||||
|
apt-get update
|
||||||
|
apt-get -y install sudo python git g++
|
||||||
|
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
if: matrix.install
|
if: matrix.install
|
||||||
run: sudo apt install ${{matrix.install}}
|
run: sudo apt-get -y install ${{matrix.install}}
|
||||||
|
|
||||||
- name: Setup Boost
|
- name: Setup Boost
|
||||||
run: |
|
run: |
|
||||||
@@ -249,7 +266,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
if: matrix.install
|
if: matrix.install
|
||||||
run: sudo apt install ${{matrix.install}}
|
run: sudo apt-get -y install ${{matrix.install}}
|
||||||
|
|
||||||
- name: Setup Boost
|
- name: Setup Boost
|
||||||
run: |
|
run: |
|
||||||
@@ -296,7 +313,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
if: matrix.install
|
if: matrix.install
|
||||||
run: sudo apt install ${{matrix.install}}
|
run: sudo apt-get -y install ${{matrix.install}}
|
||||||
|
|
||||||
- name: Setup Boost
|
- name: Setup Boost
|
||||||
run: |
|
run: |
|
||||||
@@ -353,7 +370,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
if: matrix.install
|
if: matrix.install
|
||||||
run: sudo apt install ${{matrix.install}}
|
run: sudo apt-get -y install ${{matrix.install}}
|
||||||
|
|
||||||
- name: Setup Boost
|
- name: Setup Boost
|
||||||
run: |
|
run: |
|
||||||
@@ -390,3 +407,183 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd ../boost-root/__build__
|
cd ../boost-root/__build__
|
||||||
ctest --output-on-failure --no-tests=error
|
ctest --output-on-failure --no-tests=error
|
||||||
|
|
||||||
|
windows-cmake-subdir:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: windows-2019
|
||||||
|
- os: windows-2022
|
||||||
|
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup Boost
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY%
|
||||||
|
for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi
|
||||||
|
echo LIBRARY: %LIBRARY%
|
||||||
|
echo LIBRARY=%LIBRARY%>>%GITHUB_ENV%
|
||||||
|
echo GITHUB_BASE_REF: %GITHUB_BASE_REF%
|
||||||
|
echo GITHUB_REF: %GITHUB_REF%
|
||||||
|
if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF%
|
||||||
|
set BOOST_BRANCH=develop
|
||||||
|
for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master
|
||||||
|
echo BOOST_BRANCH: %BOOST_BRANCH%
|
||||||
|
cd ..
|
||||||
|
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||||
|
cd boost-root
|
||||||
|
xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\
|
||||||
|
git submodule update --init tools/boostdep
|
||||||
|
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY%
|
||||||
|
|
||||||
|
- name: Use library with add_subdirectory (Debug)
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test
|
||||||
|
mkdir __build__ && cd __build__
|
||||||
|
cmake ..
|
||||||
|
cmake --build . --config Debug
|
||||||
|
ctest --output-on-failure --no-tests=error -C Debug
|
||||||
|
|
||||||
|
- name: Use library with add_subdirectory (Release)
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test/__build__
|
||||||
|
cmake --build . --config Release
|
||||||
|
ctest --output-on-failure --no-tests=error -C Release
|
||||||
|
|
||||||
|
windows-cmake-install:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: windows-2019
|
||||||
|
- os: windows-2022
|
||||||
|
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup Boost
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY%
|
||||||
|
for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi
|
||||||
|
echo LIBRARY: %LIBRARY%
|
||||||
|
echo LIBRARY=%LIBRARY%>>%GITHUB_ENV%
|
||||||
|
echo GITHUB_BASE_REF: %GITHUB_BASE_REF%
|
||||||
|
echo GITHUB_REF: %GITHUB_REF%
|
||||||
|
if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF%
|
||||||
|
set BOOST_BRANCH=develop
|
||||||
|
for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master
|
||||||
|
echo BOOST_BRANCH: %BOOST_BRANCH%
|
||||||
|
cd ..
|
||||||
|
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||||
|
cd boost-root
|
||||||
|
xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\
|
||||||
|
git submodule update --init tools/boostdep
|
||||||
|
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY%
|
||||||
|
|
||||||
|
- name: Configure
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd ../boost-root
|
||||||
|
mkdir __build__ && cd __build__
|
||||||
|
cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix ..
|
||||||
|
|
||||||
|
- name: Install (Debug)
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/__build__
|
||||||
|
cmake --build . --target install --config Debug
|
||||||
|
|
||||||
|
- name: Install (Release)
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/__build__
|
||||||
|
cmake --build . --target install --config Release
|
||||||
|
|
||||||
|
- name: Use the installed library (Debug)
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test && mkdir __build__ && cd __build__
|
||||||
|
cmake -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix ..
|
||||||
|
cmake --build . --config Debug
|
||||||
|
ctest --output-on-failure --no-tests=error -C Debug
|
||||||
|
|
||||||
|
- name: Use the installed library (Release)
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test/__build__
|
||||||
|
cmake --build . --config Release
|
||||||
|
ctest --output-on-failure --no-tests=error -C Release
|
||||||
|
|
||||||
|
windows-cmake-test:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: windows-2019
|
||||||
|
- os: windows-2022
|
||||||
|
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup Boost
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY%
|
||||||
|
for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi
|
||||||
|
echo LIBRARY: %LIBRARY%
|
||||||
|
echo LIBRARY=%LIBRARY%>>%GITHUB_ENV%
|
||||||
|
echo GITHUB_BASE_REF: %GITHUB_BASE_REF%
|
||||||
|
echo GITHUB_REF: %GITHUB_REF%
|
||||||
|
if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF%
|
||||||
|
set BOOST_BRANCH=develop
|
||||||
|
for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master
|
||||||
|
echo BOOST_BRANCH: %BOOST_BRANCH%
|
||||||
|
cd ..
|
||||||
|
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||||
|
cd boost-root
|
||||||
|
xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\
|
||||||
|
git submodule update --init tools/boostdep
|
||||||
|
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY%
|
||||||
|
|
||||||
|
- name: Configure
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd ../boost-root
|
||||||
|
mkdir __build__ && cd __build__
|
||||||
|
cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DBUILD_TESTING=ON ..
|
||||||
|
|
||||||
|
- name: Build tests (Debug)
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/__build__
|
||||||
|
cmake --build . --target tests --config Debug
|
||||||
|
|
||||||
|
- name: Run tests (Debug)
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/__build__
|
||||||
|
ctest --output-on-failure --no-tests=error -C Debug
|
||||||
|
|
||||||
|
- name: Build tests (Release)
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/__build__
|
||||||
|
cmake --build . --target tests --config Release
|
||||||
|
|
||||||
|
- name: Run tests (Release)
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/__build__
|
||||||
|
ctest --output-on-failure --no-tests=error -C Release
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ target_link_libraries(boost_function
|
|||||||
Boost::core
|
Boost::core
|
||||||
Boost::preprocessor
|
Boost::preprocessor
|
||||||
Boost::throw_exception
|
Boost::throw_exception
|
||||||
Boost::type_index
|
|
||||||
Boost::type_traits
|
Boost::type_traits
|
||||||
Boost::typeof
|
Boost::typeof
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#ifndef BOOST_FUNCTION_PROLOGUE_HPP
|
#ifndef BOOST_FUNCTION_PROLOGUE_HPP
|
||||||
#define BOOST_FUNCTION_PROLOGUE_HPP
|
#define BOOST_FUNCTION_PROLOGUE_HPP
|
||||||
|
# include <boost/function/detail/requires_cxx11.hpp>
|
||||||
# include <cassert>
|
# include <cassert>
|
||||||
# include <algorithm>
|
# include <algorithm>
|
||||||
# include <boost/config/no_tr1/functional.hpp> // unary_function, binary_function
|
# include <boost/config/no_tr1/functional.hpp> // unary_function, binary_function
|
||||||
|
|||||||
22
include/boost/function/detail/requires_cxx11.hpp
Normal file
22
include/boost/function/detail/requires_cxx11.hpp
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
#ifndef BOOST_FUNCTION_DETAIL_REQUIRES_CXX11_HPP_INCLUDED
|
||||||
|
#define BOOST_FUNCTION_DETAIL_REQUIRES_CXX11_HPP_INCLUDED
|
||||||
|
|
||||||
|
// Copyright 2023 Peter Dimov
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
|
#include <boost/config.hpp>
|
||||||
|
#include <boost/config/pragma_message.hpp>
|
||||||
|
|
||||||
|
#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || \
|
||||||
|
defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
|
||||||
|
defined(BOOST_NO_CXX11_DECLTYPE) || \
|
||||||
|
defined(BOOST_NO_CXX11_CONSTEXPR) || \
|
||||||
|
defined(BOOST_NO_CXX11_NOEXCEPT) || \
|
||||||
|
defined(BOOST_NO_CXX11_HDR_FUNCTIONAL)
|
||||||
|
|
||||||
|
BOOST_PRAGMA_MESSAGE("C++03 support is deprecated in Boost.Function 1.82 and will be removed in Boost.Function 1.84.")
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // #ifndef BOOST_FUNCTION_DETAIL_REQUIRES_CXX11_HPP_INCLUDED
|
||||||
@@ -11,30 +11,27 @@
|
|||||||
#ifndef BOOST_FUNCTION_BASE_HEADER
|
#ifndef BOOST_FUNCTION_BASE_HEADER
|
||||||
#define BOOST_FUNCTION_BASE_HEADER
|
#define BOOST_FUNCTION_BASE_HEADER
|
||||||
|
|
||||||
#include <stdexcept>
|
#include <boost/function/function_fwd.hpp>
|
||||||
#include <string>
|
#include <boost/function_equal.hpp>
|
||||||
#include <memory>
|
#include <boost/core/typeinfo.hpp>
|
||||||
#include <new>
|
#include <boost/core/ref.hpp>
|
||||||
#include <boost/config.hpp>
|
|
||||||
#include <boost/assert.hpp>
|
|
||||||
#include <boost/type_index.hpp>
|
|
||||||
#include <boost/type_traits/has_trivial_copy.hpp>
|
#include <boost/type_traits/has_trivial_copy.hpp>
|
||||||
#include <boost/type_traits/has_trivial_destructor.hpp>
|
#include <boost/type_traits/has_trivial_destructor.hpp>
|
||||||
#include <boost/type_traits/is_const.hpp>
|
#include <boost/type_traits/is_const.hpp>
|
||||||
#include <boost/type_traits/is_integral.hpp>
|
#include <boost/type_traits/is_integral.hpp>
|
||||||
#include <boost/type_traits/is_volatile.hpp>
|
#include <boost/type_traits/is_volatile.hpp>
|
||||||
#include <boost/type_traits/composite_traits.hpp>
|
#include <boost/type_traits/composite_traits.hpp>
|
||||||
#include <boost/ref.hpp>
|
|
||||||
#include <boost/type_traits/conditional.hpp>
|
#include <boost/type_traits/conditional.hpp>
|
||||||
#include <boost/config/workaround.hpp>
|
|
||||||
#include <boost/type_traits/alignment_of.hpp>
|
#include <boost/type_traits/alignment_of.hpp>
|
||||||
#ifndef BOOST_NO_SFINAE
|
|
||||||
#include <boost/type_traits/enable_if.hpp>
|
#include <boost/type_traits/enable_if.hpp>
|
||||||
#else
|
|
||||||
#include <boost/type_traits/integral_constant.hpp>
|
#include <boost/type_traits/integral_constant.hpp>
|
||||||
#endif
|
#include <boost/assert.hpp>
|
||||||
#include <boost/function_equal.hpp>
|
#include <boost/config.hpp>
|
||||||
#include <boost/function/function_fwd.hpp>
|
#include <boost/config/workaround.hpp>
|
||||||
|
#include <stdexcept>
|
||||||
|
#include <string>
|
||||||
|
#include <memory>
|
||||||
|
#include <new>
|
||||||
|
|
||||||
#if defined(BOOST_MSVC)
|
#if defined(BOOST_MSVC)
|
||||||
# pragma warning( push )
|
# pragma warning( push )
|
||||||
@@ -73,7 +70,7 @@ namespace boost {
|
|||||||
// For pointers to std::type_info objects
|
// For pointers to std::type_info objects
|
||||||
struct type_t {
|
struct type_t {
|
||||||
// (get_functor_type_tag, check_functor_type_tag).
|
// (get_functor_type_tag, check_functor_type_tag).
|
||||||
const boost::typeindex::type_info* type;
|
const boost::core::typeinfo* type;
|
||||||
|
|
||||||
// Whether the type is const-qualified.
|
// Whether the type is const-qualified.
|
||||||
bool const_qualified;
|
bool const_qualified;
|
||||||
@@ -203,7 +200,7 @@ namespace boost {
|
|||||||
{
|
{
|
||||||
// Check whether we have the same type. We can add
|
// Check whether we have the same type. We can add
|
||||||
// cv-qualifiers, but we can't take them away.
|
// cv-qualifiers, but we can't take them away.
|
||||||
if (*out_buffer.members.type.type == boost::typeindex::type_id<F>()
|
if (*out_buffer.members.type.type == BOOST_CORE_TYPEID(F)
|
||||||
&& (!in_buffer.members.obj_ref.is_const_qualified
|
&& (!in_buffer.members.obj_ref.is_const_qualified
|
||||||
|| out_buffer.members.type.const_qualified)
|
|| out_buffer.members.type.const_qualified)
|
||||||
&& (!in_buffer.members.obj_ref.is_volatile_qualified
|
&& (!in_buffer.members.obj_ref.is_volatile_qualified
|
||||||
@@ -215,7 +212,7 @@ namespace boost {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
case get_functor_type_tag:
|
case get_functor_type_tag:
|
||||||
out_buffer.members.type.type = &boost::typeindex::type_id<F>().type_info();
|
out_buffer.members.type.type = &BOOST_CORE_TYPEID(F);
|
||||||
out_buffer.members.type.const_qualified = in_buffer.members.obj_ref.is_const_qualified;
|
out_buffer.members.type.const_qualified = in_buffer.members.obj_ref.is_const_qualified;
|
||||||
out_buffer.members.type.volatile_qualified = in_buffer.members.obj_ref.is_volatile_qualified;
|
out_buffer.members.type.volatile_qualified = in_buffer.members.obj_ref.is_volatile_qualified;
|
||||||
return;
|
return;
|
||||||
@@ -275,12 +272,12 @@ namespace boost {
|
|||||||
} else if (op == destroy_functor_tag)
|
} else if (op == destroy_functor_tag)
|
||||||
out_buffer.members.func_ptr = 0;
|
out_buffer.members.func_ptr = 0;
|
||||||
else if (op == check_functor_type_tag) {
|
else if (op == check_functor_type_tag) {
|
||||||
if (*out_buffer.members.type.type == boost::typeindex::type_id<Functor>())
|
if (*out_buffer.members.type.type == BOOST_CORE_TYPEID(Functor))
|
||||||
out_buffer.members.obj_ptr = &in_buffer.members.func_ptr;
|
out_buffer.members.obj_ptr = &in_buffer.members.func_ptr;
|
||||||
else
|
else
|
||||||
out_buffer.members.obj_ptr = 0;
|
out_buffer.members.obj_ptr = 0;
|
||||||
} else /* op == get_functor_type_tag */ {
|
} else /* op == get_functor_type_tag */ {
|
||||||
out_buffer.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
|
out_buffer.members.type.type = &BOOST_CORE_TYPEID(Functor);
|
||||||
out_buffer.members.type.const_qualified = false;
|
out_buffer.members.type.const_qualified = false;
|
||||||
out_buffer.members.type.volatile_qualified = false;
|
out_buffer.members.type.volatile_qualified = false;
|
||||||
}
|
}
|
||||||
@@ -307,12 +304,12 @@ namespace boost {
|
|||||||
(void)f; // suppress warning about the value of f not being used (MSVC)
|
(void)f; // suppress warning about the value of f not being used (MSVC)
|
||||||
f->~Functor();
|
f->~Functor();
|
||||||
} else if (op == check_functor_type_tag) {
|
} else if (op == check_functor_type_tag) {
|
||||||
if (*out_buffer.members.type.type == boost::typeindex::type_id<Functor>())
|
if (*out_buffer.members.type.type == BOOST_CORE_TYPEID(Functor))
|
||||||
out_buffer.members.obj_ptr = in_buffer.data;
|
out_buffer.members.obj_ptr = in_buffer.data;
|
||||||
else
|
else
|
||||||
out_buffer.members.obj_ptr = 0;
|
out_buffer.members.obj_ptr = 0;
|
||||||
} else /* op == get_functor_type_tag */ {
|
} else /* op == get_functor_type_tag */ {
|
||||||
out_buffer.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
|
out_buffer.members.type.type = &BOOST_CORE_TYPEID(Functor);
|
||||||
out_buffer.members.type.const_qualified = false;
|
out_buffer.members.type.const_qualified = false;
|
||||||
out_buffer.members.type.volatile_qualified = false;
|
out_buffer.members.type.volatile_qualified = false;
|
||||||
}
|
}
|
||||||
@@ -366,12 +363,12 @@ namespace boost {
|
|||||||
delete f;
|
delete f;
|
||||||
out_buffer.members.obj_ptr = 0;
|
out_buffer.members.obj_ptr = 0;
|
||||||
} else if (op == check_functor_type_tag) {
|
} else if (op == check_functor_type_tag) {
|
||||||
if (*out_buffer.members.type.type == boost::typeindex::type_id<Functor>())
|
if (*out_buffer.members.type.type == BOOST_CORE_TYPEID(Functor))
|
||||||
out_buffer.members.obj_ptr = in_buffer.members.obj_ptr;
|
out_buffer.members.obj_ptr = in_buffer.members.obj_ptr;
|
||||||
else
|
else
|
||||||
out_buffer.members.obj_ptr = 0;
|
out_buffer.members.obj_ptr = 0;
|
||||||
} else /* op == get_functor_type_tag */ {
|
} else /* op == get_functor_type_tag */ {
|
||||||
out_buffer.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
|
out_buffer.members.type.type = &BOOST_CORE_TYPEID(Functor);
|
||||||
out_buffer.members.type.const_qualified = false;
|
out_buffer.members.type.const_qualified = false;
|
||||||
out_buffer.members.type.volatile_qualified = false;
|
out_buffer.members.type.volatile_qualified = false;
|
||||||
}
|
}
|
||||||
@@ -405,7 +402,7 @@ namespace boost {
|
|||||||
{
|
{
|
||||||
typedef typename get_function_tag<functor_type>::type tag_type;
|
typedef typename get_function_tag<functor_type>::type tag_type;
|
||||||
if (op == get_functor_type_tag) {
|
if (op == get_functor_type_tag) {
|
||||||
out_buffer.members.type.type = &boost::typeindex::type_id<functor_type>().type_info();
|
out_buffer.members.type.type = &BOOST_CORE_TYPEID(functor_type);
|
||||||
out_buffer.members.type.const_qualified = false;
|
out_buffer.members.type.const_qualified = false;
|
||||||
out_buffer.members.type.volatile_qualified = false;
|
out_buffer.members.type.volatile_qualified = false;
|
||||||
} else {
|
} else {
|
||||||
@@ -484,12 +481,12 @@ namespace boost {
|
|||||||
wrapper_allocator.deallocate(victim,1);
|
wrapper_allocator.deallocate(victim,1);
|
||||||
out_buffer.members.obj_ptr = 0;
|
out_buffer.members.obj_ptr = 0;
|
||||||
} else if (op == check_functor_type_tag) {
|
} else if (op == check_functor_type_tag) {
|
||||||
if (*out_buffer.members.type.type == boost::typeindex::type_id<Functor>())
|
if (*out_buffer.members.type.type == BOOST_CORE_TYPEID(Functor))
|
||||||
out_buffer.members.obj_ptr = in_buffer.members.obj_ptr;
|
out_buffer.members.obj_ptr = in_buffer.members.obj_ptr;
|
||||||
else
|
else
|
||||||
out_buffer.members.obj_ptr = 0;
|
out_buffer.members.obj_ptr = 0;
|
||||||
} else /* op == get_functor_type_tag */ {
|
} else /* op == get_functor_type_tag */ {
|
||||||
out_buffer.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
|
out_buffer.members.type.type = &BOOST_CORE_TYPEID(Functor);
|
||||||
out_buffer.members.type.const_qualified = false;
|
out_buffer.members.type.const_qualified = false;
|
||||||
out_buffer.members.type.volatile_qualified = false;
|
out_buffer.members.type.volatile_qualified = false;
|
||||||
}
|
}
|
||||||
@@ -515,7 +512,7 @@ namespace boost {
|
|||||||
{
|
{
|
||||||
typedef typename get_function_tag<functor_type>::type tag_type;
|
typedef typename get_function_tag<functor_type>::type tag_type;
|
||||||
if (op == get_functor_type_tag) {
|
if (op == get_functor_type_tag) {
|
||||||
out_buffer.members.type.type = &boost::typeindex::type_id<functor_type>().type_info();
|
out_buffer.members.type.type = &BOOST_CORE_TYPEID(functor_type);
|
||||||
out_buffer.members.type.const_qualified = false;
|
out_buffer.members.type.const_qualified = false;
|
||||||
out_buffer.members.type.volatile_qualified = false;
|
out_buffer.members.type.volatile_qualified = false;
|
||||||
} else {
|
} else {
|
||||||
@@ -615,9 +612,9 @@ public:
|
|||||||
|
|
||||||
/** Retrieve the type of the stored function object, or type_id<void>()
|
/** Retrieve the type of the stored function object, or type_id<void>()
|
||||||
if this is empty. */
|
if this is empty. */
|
||||||
const boost::typeindex::type_info& target_type() const
|
const boost::core::typeinfo& target_type() const
|
||||||
{
|
{
|
||||||
if (!vtable) return boost::typeindex::type_id<void>().type_info();
|
if (!vtable) return BOOST_CORE_TYPEID(void);
|
||||||
|
|
||||||
detail::function::function_buffer type;
|
detail::function::function_buffer type;
|
||||||
get_vtable()->manager(functor, type, detail::function::get_functor_type_tag);
|
get_vtable()->manager(functor, type, detail::function::get_functor_type_tag);
|
||||||
@@ -630,7 +627,7 @@ public:
|
|||||||
if (!vtable) return 0;
|
if (!vtable) return 0;
|
||||||
|
|
||||||
detail::function::function_buffer type_result;
|
detail::function::function_buffer type_result;
|
||||||
type_result.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
|
type_result.members.type.type = &BOOST_CORE_TYPEID(Functor);
|
||||||
type_result.members.type.const_qualified = is_const<Functor>::value;
|
type_result.members.type.const_qualified = is_const<Functor>::value;
|
||||||
type_result.members.type.volatile_qualified = is_volatile<Functor>::value;
|
type_result.members.type.volatile_qualified = is_volatile<Functor>::value;
|
||||||
get_vtable()->manager(functor, type_result,
|
get_vtable()->manager(functor, type_result,
|
||||||
@@ -644,7 +641,7 @@ public:
|
|||||||
if (!vtable) return 0;
|
if (!vtable) return 0;
|
||||||
|
|
||||||
detail::function::function_buffer type_result;
|
detail::function::function_buffer type_result;
|
||||||
type_result.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
|
type_result.members.type.type = &BOOST_CORE_TYPEID(Functor);
|
||||||
type_result.members.type.const_qualified = true;
|
type_result.members.type.const_qualified = true;
|
||||||
type_result.members.type.volatile_qualified = is_volatile<Functor>::value;
|
type_result.members.type.volatile_qualified = is_volatile<Functor>::value;
|
||||||
get_vtable()->manager(functor, type_result,
|
get_vtable()->manager(functor, type_result,
|
||||||
|
|||||||
@@ -86,3 +86,7 @@ run quick.cpp ;
|
|||||||
compile issue_42.cpp ;
|
compile issue_42.cpp ;
|
||||||
|
|
||||||
run fn_eq_bind_test.cpp ;
|
run fn_eq_bind_test.cpp ;
|
||||||
|
|
||||||
|
# /usr/include/c++/4.4/bits/shared_ptr.h:146: error: cannot use typeid with -fno-rtti
|
||||||
|
run contains_test.cpp : : : <rtti>off <toolset>gcc-4.4,<cxxstd>0x:<build>no : contains_test_no_rtti ;
|
||||||
|
run contains2_test.cpp : : : <rtti>off <toolset>gcc-4.4,<cxxstd>0x:<build>no : contains2_test_no_rtti ;
|
||||||
|
|||||||
@@ -18,16 +18,12 @@ config
|
|||||||
core
|
core
|
||||||
preprocessor
|
preprocessor
|
||||||
throw_exception
|
throw_exception
|
||||||
type_index
|
|
||||||
type_traits
|
type_traits
|
||||||
typeof
|
typeof
|
||||||
|
|
||||||
# Secondary dependencies
|
# Secondary dependencies
|
||||||
|
|
||||||
static_assert
|
static_assert
|
||||||
container_hash
|
|
||||||
describe
|
|
||||||
mp11
|
|
||||||
)
|
)
|
||||||
|
|
||||||
foreach(dep IN LISTS deps)
|
foreach(dep IN LISTS deps)
|
||||||
|
|||||||
Reference in New Issue
Block a user