mirror of
https://github.com/boostorg/function.git
synced 2026-01-29 07:32:15 +00:00
Compare commits
16 Commits
feature/is
...
feature/is
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
53c084084d | ||
|
|
c225007399 | ||
|
|
4633220a9d | ||
|
|
16fca8368b | ||
|
|
4cf7c718b8 | ||
|
|
389f886bc3 | ||
|
|
abc1bf9b4a | ||
|
|
e665d1e9af | ||
|
|
f7e42dc08f | ||
|
|
5b4e2797a2 | ||
|
|
5e1a4f49aa | ||
|
|
e36de553dd | ||
|
|
acaca854c4 | ||
|
|
277757befc | ||
|
|
61479788b8 | ||
|
|
e47b6a51e4 |
68
.github/workflows/ci.yml
vendored
68
.github/workflows/ci.yml
vendored
@@ -20,33 +20,48 @@ jobs:
|
|||||||
- toolset: gcc-4.8
|
- toolset: gcc-4.8
|
||||||
cxxstd: "03,11"
|
cxxstd: "03,11"
|
||||||
os: ubuntu-18.04
|
os: ubuntu-18.04
|
||||||
install: g++-4.8
|
install: g++-4.8-multilib
|
||||||
|
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-18.04
|
||||||
install: g++-5
|
install: g++-5-multilib
|
||||||
|
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-18.04
|
||||||
install: g++-6
|
install: g++-6-multilib
|
||||||
|
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-18.04
|
||||||
|
install: g++-7-multilib
|
||||||
|
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-18.04
|
||||||
install: g++-8
|
install: g++-8-multilib
|
||||||
|
address-model: 32,64
|
||||||
- toolset: gcc-9
|
- toolset: gcc-9
|
||||||
cxxstd: "03,11,14,17,2a"
|
cxxstd: "03,11,14,17,2a"
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
install: g++-9-multilib
|
||||||
|
address-model: 32,64
|
||||||
- toolset: gcc-10
|
- toolset: gcc-10
|
||||||
cxxstd: "03,11,14,17,2a"
|
cxxstd: "03,11,14,17,2a"
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
install: g++-10
|
install: g++-10-multilib
|
||||||
|
address-model: 32,64
|
||||||
- toolset: gcc-11
|
- toolset: gcc-11
|
||||||
cxxstd: "03,11,14,17,2a"
|
cxxstd: "03,11,14,17,20"
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
install: g++-11
|
install: g++-11-multilib
|
||||||
|
address-model: 32,64
|
||||||
|
- toolset: gcc-12
|
||||||
|
cxxstd: "03,11,14,17,20"
|
||||||
|
os: ubuntu-22.04
|
||||||
|
install: g++-12-multilib
|
||||||
|
address-model: 32,64
|
||||||
- toolset: clang
|
- toolset: clang
|
||||||
compiler: clang++-3.9
|
compiler: clang++-3.9
|
||||||
cxxstd: "03,11,14"
|
cxxstd: "03,11,14"
|
||||||
@@ -92,8 +107,18 @@ jobs:
|
|||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
- toolset: clang
|
- toolset: clang
|
||||||
compiler: clang++-12
|
compiler: clang++-12
|
||||||
cxxstd: "03,11,14,17,2a"
|
cxxstd: "03,11,14,17,20"
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-13
|
||||||
|
cxxstd: "03,11,14,17,20"
|
||||||
|
os: ubuntu-22.04
|
||||||
|
install: clang-13
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-14
|
||||||
|
cxxstd: "03,11,14,17,20"
|
||||||
|
os: ubuntu-22.04
|
||||||
|
install: clang-14
|
||||||
- toolset: clang
|
- toolset: clang
|
||||||
cxxstd: "03,11,14,17,2a"
|
cxxstd: "03,11,14,17,2a"
|
||||||
os: macos-10.15
|
os: macos-10.15
|
||||||
@@ -101,7 +126,7 @@ jobs:
|
|||||||
runs-on: ${{matrix.os}}
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
if: matrix.install
|
if: matrix.install
|
||||||
@@ -137,7 +162,8 @@ jobs:
|
|||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
cd ../boost-root
|
cd ../boost-root
|
||||||
./b2 -j3 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release
|
export ADDRMD=${{matrix.address-model}}
|
||||||
|
./b2 -j3 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} ${ADDRMD:+address-model=$ADDRMD} variant=debug,release
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -145,18 +171,18 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- toolset: msvc-14.0
|
- toolset: msvc-14.0
|
||||||
cxxstd: "14"
|
cxxstd: 14,latest
|
||||||
addrmd: 32,64
|
addrmd: 32,64
|
||||||
os: windows-2019
|
os: windows-2019
|
||||||
- toolset: msvc-14.1
|
|
||||||
cxxstd: "14,17,latest"
|
|
||||||
addrmd: 32,64
|
|
||||||
os: windows-2016
|
|
||||||
- toolset: msvc-14.2
|
- toolset: msvc-14.2
|
||||||
cxxstd: "14,17,latest"
|
cxxstd: "14,17,20,latest"
|
||||||
addrmd: 32,64
|
addrmd: 32,64
|
||||||
os: windows-2019
|
os: windows-2019
|
||||||
- toolset: msvc-14.3
|
- toolset: msvc-14.3
|
||||||
|
cxxstd: "14,17,20,latest"
|
||||||
|
addrmd: 32,64
|
||||||
|
os: windows-2022
|
||||||
|
- toolset: clang-win
|
||||||
cxxstd: "14,17,latest"
|
cxxstd: "14,17,latest"
|
||||||
addrmd: 32,64
|
addrmd: 32,64
|
||||||
os: windows-2022
|
os: windows-2022
|
||||||
@@ -168,7 +194,7 @@ jobs:
|
|||||||
runs-on: ${{matrix.os}}
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup Boost
|
- name: Setup Boost
|
||||||
shell: cmd
|
shell: cmd
|
||||||
@@ -196,7 +222,7 @@ jobs:
|
|||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
cd ../boost-root
|
cd ../boost-root
|
||||||
b2 -j3 libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release
|
b2 -j3 libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release embed-manifest-via=linker
|
||||||
|
|
||||||
posix-cmake-subdir:
|
posix-cmake-subdir:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -210,7 +236,7 @@ jobs:
|
|||||||
runs-on: ${{matrix.os}}
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
if: matrix.install
|
if: matrix.install
|
||||||
@@ -256,7 +282,7 @@ jobs:
|
|||||||
runs-on: ${{matrix.os}}
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
if: matrix.install
|
if: matrix.install
|
||||||
@@ -312,7 +338,7 @@ jobs:
|
|||||||
runs-on: ${{matrix.os}}
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
if: matrix.install
|
if: matrix.install
|
||||||
|
|||||||
@@ -7,11 +7,11 @@ into the C++11 standard as [`std::function`](https://en.cppreference.com/w/cpp/u
|
|||||||
|
|
||||||
## Currently supported compilers
|
## Currently supported compilers
|
||||||
|
|
||||||
* g++ 4.4 or later
|
* g++ 4.8 or later
|
||||||
* clang++ 3.3 or later
|
* clang++ 3.9 or later
|
||||||
* Visual Studio 2005-2017
|
* Visual Studio 2005-2022
|
||||||
|
|
||||||
Tested on [Travis](https://travis-ci.org/boostorg/function/) and [Appveyor](https://ci.appveyor.com/project/pdimov/function/).
|
Tested on [Github Actions](https://github.com/boostorg/function/actions) and [Appveyor](https://ci.appveyor.com/project/pdimov/function/).
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
10
appveyor.yml
10
appveyor.yml
@@ -24,14 +24,10 @@ environment:
|
|||||||
TOOLSET: msvc-14.1
|
TOOLSET: msvc-14.1
|
||||||
CXXSTD: 14,17
|
CXXSTD: 14,17
|
||||||
ADDRMD: 32,64
|
ADDRMD: 32,64
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
|
||||||
TOOLSET: clang-win
|
|
||||||
CXXSTD: 14,17
|
|
||||||
ADDRMD: 64
|
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||||
TOOLSET: msvc-14.2
|
TOOLSET: clang-win
|
||||||
CXXSTD: 14,17,latest
|
CXXSTD: 14,17,latest
|
||||||
ADDRMD: 32,64
|
ADDRMD: 64
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||||
ADDPATH: C:\cygwin\bin;
|
ADDPATH: C:\cygwin\bin;
|
||||||
TOOLSET: gcc
|
TOOLSET: gcc
|
||||||
@@ -67,4 +63,4 @@ test_script:
|
|||||||
- PATH=%ADDPATH%%PATH%
|
- PATH=%ADDPATH%%PATH%
|
||||||
- if not "%CXXSTD%" == "" set CXXSTD=cxxstd=%CXXSTD%
|
- if not "%CXXSTD%" == "" set CXXSTD=cxxstd=%CXXSTD%
|
||||||
- if not "%ADDRMD%" == "" set ADDRMD=address-model=%ADDRMD%
|
- if not "%ADDRMD%" == "" set ADDRMD=address-model=%ADDRMD%
|
||||||
- b2 -j3 libs/function/test toolset=%TOOLSET% %CXXSTD% %ADDRMD% variant=debug,release
|
- b2 -j3 libs/function/test toolset=%TOOLSET% %CXXSTD% %ADDRMD% variant=debug,release embed-manifest-via=linker
|
||||||
|
|||||||
@@ -906,6 +906,10 @@ namespace boost {
|
|||||||
// This warning is technically correct, but we don't want to pay the price for initializing
|
// This warning is technically correct, but we don't want to pay the price for initializing
|
||||||
// just to silence a warning: https://github.com/boostorg/function/issues/27
|
// just to silence a warning: https://github.com/boostorg/function/issues/27
|
||||||
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||||
|
# if (BOOST_GCC >= 120000)
|
||||||
|
// GCC 12 emits a different warning: https://github.com/boostorg/function/issues/42
|
||||||
|
# pragma GCC diagnostic ignored "-Wuninitialized"
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
std::memcpy(this->functor.data, f.functor.data, sizeof(boost::detail::function::function_buffer));
|
std::memcpy(this->functor.data, f.functor.data, sizeof(boost::detail::function::function_buffer));
|
||||||
# if defined(BOOST_GCC) && (BOOST_GCC >= 40700)
|
# if defined(BOOST_GCC) && (BOOST_GCC >= 40700)
|
||||||
@@ -1004,14 +1008,26 @@ namespace boost {
|
|||||||
// This warning is technically correct, but we don't want to pay the price for initializing
|
// This warning is technically correct, but we don't want to pay the price for initializing
|
||||||
// just to silence a warning: https://github.com/boostorg/function/issues/27
|
// just to silence a warning: https://github.com/boostorg/function/issues/27
|
||||||
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||||
|
# if (BOOST_GCC >= 120000)
|
||||||
|
// GCC 12 emits a different warning: https://github.com/boostorg/function/issues/42
|
||||||
|
# pragma GCC diagnostic ignored "-Wuninitialized"
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
std::memcpy(this->functor.data, f.functor.data, sizeof(this->functor.data));
|
std::memcpy(this->functor.data, f.functor.data, sizeof(this->functor.data));
|
||||||
# if defined(BOOST_GCC) && (BOOST_GCC >= 40700)
|
# if defined(BOOST_GCC) && (BOOST_GCC >= 40700)
|
||||||
# pragma GCC diagnostic pop
|
# pragma GCC diagnostic pop
|
||||||
# endif
|
# endif
|
||||||
} else
|
} else
|
||||||
|
#if defined(BOOST_GCC) && (__GNUC__ >= 11)
|
||||||
|
# pragma GCC diagnostic push
|
||||||
|
// False positive in GCC 11/12 for empty function objects (function_n_test.cpp:673)
|
||||||
|
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||||
|
#endif
|
||||||
get_vtable()->base.manager(f.functor, this->functor,
|
get_vtable()->base.manager(f.functor, this->functor,
|
||||||
boost::detail::function::move_functor_tag);
|
boost::detail::function::move_functor_tag);
|
||||||
|
#if defined(BOOST_GCC) && (__GNUC__ >= 11)
|
||||||
|
# pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
f.vtable = 0;
|
f.vtable = 0;
|
||||||
} else {
|
} else {
|
||||||
clear();
|
clear();
|
||||||
|
|||||||
@@ -9,6 +9,15 @@
|
|||||||
|
|
||||||
import testing ;
|
import testing ;
|
||||||
|
|
||||||
|
project
|
||||||
|
: default-build
|
||||||
|
<warnings>extra
|
||||||
|
: requirements
|
||||||
|
<toolset>msvc:<warnings-as-errors>on
|
||||||
|
<toolset>gcc:<warnings-as-errors>on
|
||||||
|
<toolset>clang:<warnings-as-errors>on
|
||||||
|
;
|
||||||
|
|
||||||
run function_test.cpp ;
|
run function_test.cpp ;
|
||||||
# /usr/include/c++/4.4/bits/shared_ptr.h:146: error: cannot use typeid with -fno-rtti
|
# /usr/include/c++/4.4/bits/shared_ptr.h:146: error: cannot use typeid with -fno-rtti
|
||||||
run function_test.cpp : : : <rtti>off <toolset>gcc-4.4.7,<cxxstd>0x:<build>no : function_test_no_rtti ;
|
run function_test.cpp : : : <rtti>off <toolset>gcc-4.4.7,<cxxstd>0x:<build>no : function_test_no_rtti ;
|
||||||
@@ -73,3 +82,5 @@ run test_return_function.cpp return_function/<cxxstd>14 : : : <link>shared $(che
|
|||||||
run test_return_function.cpp return_function/<cxxstd>14 : : : <link>static $(check14) : return_function_static_14 ;
|
run test_return_function.cpp return_function/<cxxstd>14 : : : <link>static $(check14) : return_function_static_14 ;
|
||||||
|
|
||||||
run quick.cpp ;
|
run quick.cpp ;
|
||||||
|
|
||||||
|
compile issue_42.cpp ;
|
||||||
|
|||||||
@@ -33,10 +33,8 @@ boost_add_subdir(typeof)
|
|||||||
|
|
||||||
boost_add_subdir(static_assert)
|
boost_add_subdir(static_assert)
|
||||||
boost_add_subdir(container_hash)
|
boost_add_subdir(container_hash)
|
||||||
boost_add_subdir(smart_ptr)
|
boost_add_subdir(describe)
|
||||||
boost_add_subdir(detail)
|
boost_add_subdir(mp11)
|
||||||
boost_add_subdir(move)
|
|
||||||
boost_add_subdir(predef)
|
|
||||||
|
|
||||||
# --target check
|
# --target check
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,12 @@
|
|||||||
|
|
||||||
// For more information, see http://www.boost.org
|
// For more information, see http://www.boost.org
|
||||||
|
|
||||||
|
#if defined(__clang__) && defined(__has_warning)
|
||||||
|
# if __has_warning( "-Wself-assign-overloaded" )
|
||||||
|
# pragma clang diagnostic ignored "-Wself-assign-overloaded"
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <boost/function.hpp>
|
#include <boost/function.hpp>
|
||||||
#include <boost/core/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|||||||
@@ -7,6 +7,12 @@
|
|||||||
|
|
||||||
// For more information, see http://www.boost.org
|
// For more information, see http://www.boost.org
|
||||||
|
|
||||||
|
#if defined(__clang__) && defined(__has_warning)
|
||||||
|
# if __has_warning( "-Wself-assign-overloaded" )
|
||||||
|
# pragma clang diagnostic ignored "-Wself-assign-overloaded"
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <boost/function.hpp>
|
#include <boost/function.hpp>
|
||||||
#include <boost/core/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|||||||
21
test/issue_42.cpp
Normal file
21
test/issue_42.cpp
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
// Copyright 2022 Peter Dimov.
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
//
|
||||||
|
// https://github.com/boostorg/function/issues/42
|
||||||
|
|
||||||
|
#include <boost/function.hpp>
|
||||||
|
|
||||||
|
struct F
|
||||||
|
{
|
||||||
|
int operator()( int x ) const { return -x; }
|
||||||
|
};
|
||||||
|
|
||||||
|
struct X
|
||||||
|
{
|
||||||
|
boost::function<int(int)> f_;
|
||||||
|
explicit X( boost::function<int(int)> f ): f_( f ) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
F f2;
|
||||||
|
X x( f2 ); // -Wuninitialized under GCC 12
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
struct Y {
|
struct Y {
|
||||||
Y(int y = 0) : y_(y) {}
|
Y(int y = 0) : y_(y) {}
|
||||||
bool operator==(const Y& rhs) { return y_ == rhs.y_; }
|
bool operator==(const Y& rhs) const { return y_ == rhs.y_; }
|
||||||
private:
|
private:
|
||||||
int y_;
|
int y_;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
struct Y {
|
struct Y {
|
||||||
Y(int y = 0) : y_(y) {}
|
Y(int y = 0) : y_(y) {}
|
||||||
bool operator==(const Y& rhs) { return y_ == rhs.y_; }
|
bool operator==(const Y& rhs) const { return y_ == rhs.y_; }
|
||||||
private:
|
private:
|
||||||
int y_;
|
int y_;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
#include <boost/function.hpp>
|
#include <boost/function.hpp>
|
||||||
#include <boost/core/is_same.hpp>
|
|
||||||
#include <boost/core/lightweight_test_trait.hpp>
|
#include <boost/core/lightweight_test_trait.hpp>
|
||||||
|
|
||||||
struct X
|
struct X
|
||||||
@@ -27,14 +26,14 @@ int main()
|
|||||||
{
|
{
|
||||||
typedef boost::function<X(Y)> F1;
|
typedef boost::function<X(Y)> F1;
|
||||||
|
|
||||||
BOOST_TEST_TRAIT_TRUE(( boost::core::is_same<F1::result_type, X> ));
|
BOOST_TEST_TRAIT_SAME(F1::result_type, X);
|
||||||
BOOST_TEST_TRAIT_TRUE(( boost::core::is_same<F1::argument_type, Y> ));
|
BOOST_TEST_TRAIT_SAME(F1::argument_type, Y);
|
||||||
|
|
||||||
typedef boost::function<X(Y, Z)> F2;
|
typedef boost::function<X(Y, Z)> F2;
|
||||||
|
|
||||||
BOOST_TEST_TRAIT_TRUE(( boost::core::is_same<F2::result_type, X> ));
|
BOOST_TEST_TRAIT_SAME(F2::result_type, X);
|
||||||
BOOST_TEST_TRAIT_TRUE(( boost::core::is_same<F2::first_argument_type, Y> ));
|
BOOST_TEST_TRAIT_SAME(F2::first_argument_type, Y);
|
||||||
BOOST_TEST_TRAIT_TRUE(( boost::core::is_same<F2::second_argument_type, Z> ));
|
BOOST_TEST_TRAIT_SAME(F2::second_argument_type, Z);
|
||||||
|
|
||||||
return boost::report_errors();
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,16 @@
|
|||||||
|
|
||||||
// For more information, see http://www.boost.org/
|
// For more information, see http://www.boost.org/
|
||||||
|
|
||||||
|
#if defined(__clang__) && defined(__has_warning)
|
||||||
|
# if __has_warning( "-Wdeprecated-declarations" )
|
||||||
|
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && __GNUC__ >= 12
|
||||||
|
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <boost/function.hpp>
|
#include <boost/function.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|||||||
@@ -8,7 +8,16 @@
|
|||||||
|
|
||||||
// For more information, see http://www.boost.org/
|
// For more information, see http://www.boost.org/
|
||||||
|
|
||||||
|
#if defined(__clang__) && defined(__has_warning)
|
||||||
|
# if __has_warning( "-Wdeprecated-declarations" )
|
||||||
|
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && __GNUC__ >= 12
|
||||||
|
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <boost/function.hpp>
|
#include <boost/function.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|||||||
Reference in New Issue
Block a user