mirror of
https://github.com/boostorg/bind.git
synced 2026-04-18 07:28:46 +02:00
Compare commits
10 Commits
feature/st
...
boost-1.78
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24bd5e7e5b | ||
|
|
b0b2ed2814 | ||
|
|
b719777942 | ||
|
|
5b1fe62dbb | ||
|
|
34a3ee580c | ||
|
|
ebc0c07e96 | ||
|
|
12e2ca325d | ||
|
|
1e3efb361b | ||
|
|
bb50844171 | ||
|
|
ee25007a9f |
67
.github/workflows/ci.yml
vendored
67
.github/workflows/ci.yml
vendored
@@ -17,24 +17,17 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- toolset: gcc-4.7
|
|
||||||
cxxstd: "03,11"
|
|
||||||
os: ubuntu-16.04
|
|
||||||
install: g++-4.7
|
|
||||||
- toolset: gcc-4.8
|
- toolset: gcc-4.8
|
||||||
cxxstd: "03,11"
|
cxxstd: "03,11"
|
||||||
os: ubuntu-16.04
|
os: ubuntu-18.04
|
||||||
install: g++-4.8
|
install: g++-4.8
|
||||||
- toolset: gcc-4.9
|
|
||||||
cxxstd: "03,11"
|
|
||||||
os: ubuntu-16.04
|
|
||||||
install: g++-4.9
|
|
||||||
- toolset: gcc-5
|
- toolset: gcc-5
|
||||||
cxxstd: "03,11,14,1z"
|
cxxstd: "03,11,14,1z"
|
||||||
os: ubuntu-16.04
|
os: ubuntu-18.04
|
||||||
|
install: g++-5
|
||||||
- toolset: gcc-6
|
- toolset: gcc-6
|
||||||
cxxstd: "03,11,14,1z"
|
cxxstd: "03,11,14,1z"
|
||||||
os: ubuntu-16.04
|
os: ubuntu-18.04
|
||||||
install: g++-6
|
install: g++-6
|
||||||
- toolset: gcc-7
|
- toolset: gcc-7
|
||||||
cxxstd: "03,11,14,17"
|
cxxstd: "03,11,14,17"
|
||||||
@@ -42,51 +35,38 @@ jobs:
|
|||||||
- 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
|
||||||
- toolset: gcc-9
|
- toolset: gcc-9
|
||||||
cxxstd: "03,11,14,17,2a"
|
cxxstd: "03,11,14,17,2a"
|
||||||
os: ubuntu-18.04
|
os: ubuntu-20.04
|
||||||
- toolset: gcc-10
|
- toolset: gcc-10
|
||||||
cxxstd: "03,11,14,17,2a"
|
cxxstd: "03,11,14,17,2a"
|
||||||
os: ubuntu-18.04
|
os: ubuntu-20.04
|
||||||
- toolset: clang
|
install: g++-10
|
||||||
compiler: clang++-3.5
|
- toolset: gcc-11
|
||||||
cxxstd: "03,11,14"
|
cxxstd: "03,11,14,17,2a"
|
||||||
os: ubuntu-16.04
|
os: ubuntu-20.04
|
||||||
install: clang-3.5
|
install: g++-11
|
||||||
- toolset: clang
|
|
||||||
compiler: clang++-3.6
|
|
||||||
cxxstd: "03,11,14"
|
|
||||||
os: ubuntu-16.04
|
|
||||||
install: clang-3.6
|
|
||||||
- toolset: clang
|
|
||||||
compiler: clang++-3.7
|
|
||||||
cxxstd: "03,11,14"
|
|
||||||
os: ubuntu-16.04
|
|
||||||
install: clang-3.7
|
|
||||||
- toolset: clang
|
|
||||||
compiler: clang++-3.8
|
|
||||||
cxxstd: "03,11,14"
|
|
||||||
os: ubuntu-16.04
|
|
||||||
install: clang-3.8
|
|
||||||
- toolset: clang
|
- toolset: clang
|
||||||
compiler: clang++-3.9
|
compiler: clang++-3.9
|
||||||
cxxstd: "03,11,14"
|
cxxstd: "03,11,14"
|
||||||
os: ubuntu-16.04
|
os: 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-16.04
|
os: 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-16.04
|
os: 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-18.04
|
||||||
|
install: clang-6.0
|
||||||
- toolset: clang
|
- toolset: clang
|
||||||
compiler: clang++-7
|
compiler: clang++-7
|
||||||
cxxstd: "03,11,14,17"
|
cxxstd: "03,11,14,17"
|
||||||
@@ -94,16 +74,29 @@ jobs:
|
|||||||
install: clang-7
|
install: clang-7
|
||||||
- toolset: clang
|
- toolset: clang
|
||||||
compiler: clang++-8
|
compiler: clang++-8
|
||||||
cxxstd: "03,11,14,17,2a"
|
cxxstd: "03,11,14,17"
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
install: clang-8
|
||||||
- toolset: clang
|
- toolset: clang
|
||||||
compiler: clang++-9
|
compiler: clang++-9
|
||||||
cxxstd: "03,11,14,17,2a"
|
cxxstd: "03,11,14,17,2a"
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
install: clang-9
|
||||||
- toolset: clang
|
- toolset: clang
|
||||||
compiler: clang++-10
|
compiler: clang++-10
|
||||||
cxxstd: "03,11,14,17,2a"
|
cxxstd: "03,11,14,17,2a"
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
install: clang-10
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-11
|
||||||
|
cxxstd: "03,11,14,17,2a"
|
||||||
|
os: ubuntu-20.04
|
||||||
|
install: clang-11
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-12
|
||||||
|
cxxstd: "03,11,14,17,2a"
|
||||||
|
os: ubuntu-20.04
|
||||||
|
install: clang-12
|
||||||
- toolset: clang
|
- toolset: clang
|
||||||
cxxstd: "03,11,14,17,2a"
|
cxxstd: "03,11,14,17,2a"
|
||||||
os: macos-10.15
|
os: macos-10.15
|
||||||
|
|||||||
@@ -311,7 +311,7 @@ matrix:
|
|||||||
env: CMAKE_TEST=1
|
env: CMAKE_TEST=1
|
||||||
script:
|
script:
|
||||||
- mkdir __build__ && cd __build__
|
- mkdir __build__ && cd __build__
|
||||||
- cmake -DBOOST_ENABLE_CMAKE=1 -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES=bind ..
|
- cmake -DBOOST_ENABLE_CMAKE=1 -DBUILD_TESTING=ON -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES=bind ..
|
||||||
- ctest --output-on-failure -R boost_bind
|
- ctest --output-on-failure -R boost_bind
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include <boost/config.hpp>
|
||||||
|
|
||||||
namespace boost
|
namespace boost
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -18,6 +20,15 @@ template<class R> struct apply
|
|||||||
{
|
{
|
||||||
typedef R result_type;
|
typedef R result_type;
|
||||||
|
|
||||||
|
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||||
|
|
||||||
|
template<class F, class... A> result_type operator()( F&& f, A&&... a ) const
|
||||||
|
{
|
||||||
|
return static_cast<F&&>( f )( static_cast<A&&>( a )... );
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
template<class F> result_type operator()(F & f) const
|
template<class F> result_type operator()(F & f) const
|
||||||
{
|
{
|
||||||
return f();
|
return f();
|
||||||
@@ -67,6 +78,8 @@ template<class R> struct apply
|
|||||||
{
|
{
|
||||||
return f(a1, a2, a3, a4, a5, a6, a7, a8, a9);
|
return f(a1, a2, a3, a4, a5, a6, a7, a8, a9);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace boost
|
} // namespace boost
|
||||||
|
|||||||
@@ -21,7 +21,9 @@
|
|||||||
// See http://www.boost.org/libs/bind/bind.html for documentation.
|
// See http://www.boost.org/libs/bind/bind.html for documentation.
|
||||||
//
|
//
|
||||||
|
|
||||||
#if defined(_MSVC_LANG) && _MSVC_LANG >= 17
|
#include <boost/config.hpp>
|
||||||
|
|
||||||
|
#if BOOST_CXX_VERSION >= 201700L
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -48,7 +50,7 @@ template<class F> struct result_traits< unspecified, reference_wrapper<F> >
|
|||||||
typedef typename F::result_type type;
|
typedef typename F::result_type type;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(_MSVC_LANG) && _MSVC_LANG >= 17
|
#if BOOST_CXX_VERSION >= 201700L
|
||||||
|
|
||||||
template<class T> struct result_traits< unspecified, std::plus<T> >
|
template<class T> struct result_traits< unspecified, std::plus<T> >
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -79,3 +79,7 @@ run protect_test2.cpp ;
|
|||||||
run protect_cpp20_test.cpp ;
|
run protect_cpp20_test.cpp ;
|
||||||
run bind_noexcept_mf2_test.cpp ;
|
run bind_noexcept_mf2_test.cpp ;
|
||||||
run std_placeholders_test.cpp ;
|
run std_placeholders_test.cpp ;
|
||||||
|
run apply_test.cpp ;
|
||||||
|
run apply_test2.cpp ;
|
||||||
|
run apply_rv_test.cpp ;
|
||||||
|
run apply_rv_test2.cpp ;
|
||||||
|
|||||||
77
test/apply_rv_test.cpp
Normal file
77
test/apply_rv_test.cpp
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
// Copyright 2021 Peter Dimov
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
|
#include<boost/bind/apply.hpp>
|
||||||
|
#include<boost/bind/bind.hpp>
|
||||||
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
#include <boost/config.hpp>
|
||||||
|
#include <boost/config/pragma_message.hpp>
|
||||||
|
|
||||||
|
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||||
|
|
||||||
|
BOOST_PRAGMA_MESSAGE("Skipping test because BOOST_NO_CXX11_RVALUE_REFERENCES is defined")
|
||||||
|
int main() {}
|
||||||
|
|
||||||
|
#elif defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||||
|
|
||||||
|
BOOST_PRAGMA_MESSAGE("Skipping test because BOOST_NO_CXX11_VARIADIC_TEMPLATES is defined")
|
||||||
|
int main() {}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
struct F
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
int operator()( int & x ) const
|
||||||
|
{
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
int operator()( int && x ) const
|
||||||
|
{
|
||||||
|
return -x;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
int& get_lvalue_arg()
|
||||||
|
{
|
||||||
|
static int a = 1;
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
int get_prvalue_arg()
|
||||||
|
{
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
F& get_lvalue_f()
|
||||||
|
{
|
||||||
|
static F f;
|
||||||
|
return f;
|
||||||
|
}
|
||||||
|
|
||||||
|
F get_prvalue_f()
|
||||||
|
{
|
||||||
|
return F();
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
using namespace boost::placeholders;
|
||||||
|
|
||||||
|
BOOST_TEST_EQ( boost::bind(boost::apply<int>(), boost::bind(get_lvalue_f), boost::bind(get_lvalue_arg))(), 1 );
|
||||||
|
BOOST_TEST_EQ( boost::bind(boost::apply<int>(), boost::bind(get_lvalue_f), boost::bind(get_prvalue_arg))(), -2 );
|
||||||
|
BOOST_TEST_EQ( boost::bind(boost::apply<int>(), boost::bind(get_prvalue_f), boost::bind(get_lvalue_arg))(), 1 );
|
||||||
|
BOOST_TEST_EQ( boost::bind(boost::apply<int>(), boost::bind(get_prvalue_f), boost::bind(get_prvalue_arg))(), -2 );
|
||||||
|
|
||||||
|
BOOST_TEST_EQ( boost::bind(boost::apply<int>(), boost::bind(boost::apply<F&>(), _1), boost::bind(boost::apply<int&>(), _2))(get_lvalue_f, get_lvalue_arg), 1 );
|
||||||
|
BOOST_TEST_EQ( boost::bind(boost::apply<int>(), boost::bind(boost::apply<F&>(), _1), boost::bind(boost::apply<int>(), _2))(get_lvalue_f, get_prvalue_arg), -2 );
|
||||||
|
BOOST_TEST_EQ( boost::bind(boost::apply<int>(), boost::bind(boost::apply<F>(), _1), boost::bind(boost::apply<int&>(), _2))(get_prvalue_f, get_lvalue_arg), 1 );
|
||||||
|
BOOST_TEST_EQ( boost::bind(boost::apply<int>(), boost::bind(boost::apply<F>(), _1), boost::bind(boost::apply<int>(), _2))(get_prvalue_f, get_prvalue_arg), -2 );
|
||||||
|
|
||||||
|
return boost::report_errors();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
92
test/apply_rv_test2.cpp
Normal file
92
test/apply_rv_test2.cpp
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
// Copyright 2021 Peter Dimov
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
|
#include<boost/bind/apply.hpp>
|
||||||
|
#include<boost/bind/bind.hpp>
|
||||||
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
#include <boost/config.hpp>
|
||||||
|
#include <boost/config/pragma_message.hpp>
|
||||||
|
|
||||||
|
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||||
|
|
||||||
|
BOOST_PRAGMA_MESSAGE("Skipping test because BOOST_NO_CXX11_RVALUE_REFERENCES is defined")
|
||||||
|
int main() {}
|
||||||
|
|
||||||
|
#elif defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||||
|
|
||||||
|
BOOST_PRAGMA_MESSAGE("Skipping test because BOOST_NO_CXX11_VARIADIC_TEMPLATES is defined")
|
||||||
|
int main() {}
|
||||||
|
|
||||||
|
#elif defined(BOOST_NO_CXX11_REF_QUALIFIERS)
|
||||||
|
|
||||||
|
BOOST_PRAGMA_MESSAGE("Skipping test because BOOST_NO_CXX11_REF_QUALIFIERS is defined")
|
||||||
|
int main() {}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
struct F
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
int operator()( int & x ) &
|
||||||
|
{
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
int operator()( int && x ) &
|
||||||
|
{
|
||||||
|
return -x;
|
||||||
|
}
|
||||||
|
|
||||||
|
int operator()( int & x ) &&
|
||||||
|
{
|
||||||
|
return x + 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
int operator()( int && x ) &&
|
||||||
|
{
|
||||||
|
return -x - 10;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
int& get_lvalue_arg()
|
||||||
|
{
|
||||||
|
static int a = 1;
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
int get_prvalue_arg()
|
||||||
|
{
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
F& get_lvalue_f()
|
||||||
|
{
|
||||||
|
static F f;
|
||||||
|
return f;
|
||||||
|
}
|
||||||
|
|
||||||
|
F get_prvalue_f()
|
||||||
|
{
|
||||||
|
return F();
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
using namespace boost::placeholders;
|
||||||
|
|
||||||
|
BOOST_TEST_EQ( boost::bind(boost::apply<int>(), boost::bind(get_lvalue_f), boost::bind(get_lvalue_arg))(), 1 );
|
||||||
|
BOOST_TEST_EQ( boost::bind(boost::apply<int>(), boost::bind(get_lvalue_f), boost::bind(get_prvalue_arg))(), -2 );
|
||||||
|
BOOST_TEST_EQ( boost::bind(boost::apply<int>(), boost::bind(get_prvalue_f), boost::bind(get_lvalue_arg))(), 11 );
|
||||||
|
BOOST_TEST_EQ( boost::bind(boost::apply<int>(), boost::bind(get_prvalue_f), boost::bind(get_prvalue_arg))(), -12 );
|
||||||
|
|
||||||
|
BOOST_TEST_EQ( boost::bind(boost::apply<int>(), boost::bind(boost::apply<F&>(), _1), boost::bind(boost::apply<int&>(), _2))(get_lvalue_f, get_lvalue_arg), 1 );
|
||||||
|
BOOST_TEST_EQ( boost::bind(boost::apply<int>(), boost::bind(boost::apply<F&>(), _1), boost::bind(boost::apply<int>(), _2))(get_lvalue_f, get_prvalue_arg), -2 );
|
||||||
|
BOOST_TEST_EQ( boost::bind(boost::apply<int>(), boost::bind(boost::apply<F>(), _1), boost::bind(boost::apply<int&>(), _2))(get_prvalue_f, get_lvalue_arg), 11 );
|
||||||
|
BOOST_TEST_EQ( boost::bind(boost::apply<int>(), boost::bind(boost::apply<F>(), _1), boost::bind(boost::apply<int>(), _2))(get_prvalue_f, get_prvalue_arg), -12 );
|
||||||
|
|
||||||
|
return boost::report_errors();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
29
test/apply_test.cpp
Normal file
29
test/apply_test.cpp
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
// Copyright 2021 Peter Dimov
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
|
#include <boost/bind/apply.hpp>
|
||||||
|
#include <boost/bind/protect.hpp>
|
||||||
|
#include <boost/bind/bind.hpp>
|
||||||
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
|
using namespace boost::placeholders;
|
||||||
|
|
||||||
|
int f( int x )
|
||||||
|
{
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
BOOST_TEST_EQ( boost::bind( boost::apply<int>(), boost::protect( boost::bind( f, _1 ) ), 1 )(), 1 );
|
||||||
|
BOOST_TEST_EQ( boost::bind( boost::apply<int>(), boost::protect( boost::bind( f, _2 ) ), 1, 2 )(), 2 );
|
||||||
|
BOOST_TEST_EQ( boost::bind( boost::apply<int>(), boost::protect( boost::bind( f, _3 ) ), 1, 2, 3 )(), 3 );
|
||||||
|
BOOST_TEST_EQ( boost::bind( boost::apply<int>(), boost::protect( boost::bind( f, _4 ) ), 1, 2, 3, 4 )(), 4 );
|
||||||
|
BOOST_TEST_EQ( boost::bind( boost::apply<int>(), boost::protect( boost::bind( f, _5 ) ), 1, 2, 3, 4, 5 )(), 5 );
|
||||||
|
BOOST_TEST_EQ( boost::bind( boost::apply<int>(), boost::protect( boost::bind( f, _6 ) ), 1, 2, 3, 4, 5, 6 )(), 6 );
|
||||||
|
BOOST_TEST_EQ( boost::bind( boost::apply<int>(), boost::protect( boost::bind( f, _7 ) ), 1, 2, 3, 4, 5, 6, 7 )(), 7 );
|
||||||
|
BOOST_TEST_EQ( boost::bind( boost::apply<int>(), boost::protect( boost::bind( f, _8 ) ), 1, 2, 3, 4, 5, 6, 7, 8 )(), 8 );
|
||||||
|
|
||||||
|
return boost::report_errors();
|
||||||
|
}
|
||||||
15
test/apply_test2.cpp
Normal file
15
test/apply_test2.cpp
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
// Copyright 2021 Peter Dimov
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
|
#include <boost/bind/apply.hpp>
|
||||||
|
#include <boost/core/lightweight_test_trait.hpp>
|
||||||
|
#include <boost/core/is_same.hpp>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
BOOST_TEST_TRAIT_TRUE((boost::core::is_same<void, boost::apply<void>::result_type>));
|
||||||
|
BOOST_TEST_TRAIT_TRUE((boost::core::is_same<int&, boost::apply<int&>::result_type>));
|
||||||
|
|
||||||
|
return boost::report_errors();
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user