forked from boostorg/bind
Use BOOST_TEST_TRAIT_SAME
This commit is contained in:
@ -6,6 +6,6 @@ include(BoostTestJamfile OPTIONAL RESULT_VARIABLE HAVE_BOOST_TEST)
|
||||
|
||||
if(HAVE_BOOST_TEST)
|
||||
|
||||
boost_test_jamfile(FILE Jamfile.v2 LINK_LIBRARIES Boost::bind Boost::core Boost::function Boost::smart_ptr Boost::type_traits)
|
||||
boost_test_jamfile(FILE Jamfile.v2 LINK_LIBRARIES Boost::bind Boost::core Boost::function Boost::smart_ptr)
|
||||
|
||||
endif()
|
||||
|
@ -4,12 +4,11 @@
|
||||
|
||||
#include <boost/bind/apply.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
BOOST_TEST_TRAIT_TRUE((boost::is_same<void, boost::apply<void>::result_type>));
|
||||
BOOST_TEST_TRAIT_TRUE((boost::is_same<int&, boost::apply<int&>::result_type>));
|
||||
BOOST_TEST_TRAIT_SAME(void, boost::apply<void>::result_type);
|
||||
BOOST_TEST_TRAIT_SAME(int&, boost::apply<int&>::result_type);
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
@ -6,11 +6,10 @@
|
||||
|
||||
#include <boost/bind/protect.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
template<class T, class F> void test( F )
|
||||
{
|
||||
BOOST_TEST_TRAIT_TRUE((boost::is_same<typename T::result_type, typename F::result_type>));
|
||||
BOOST_TEST_TRAIT_SAME(typename T::result_type, typename F::result_type);
|
||||
}
|
||||
|
||||
struct X
|
||||
@ -29,7 +28,7 @@ template<class T, class U> struct inherit: T, U
|
||||
template<class F> void test2( F )
|
||||
{
|
||||
// test that F doesn't have ::result_type
|
||||
BOOST_TEST_TRAIT_TRUE((boost::is_same<typename inherit<F, X>::result_type, typename X::result_type>));
|
||||
BOOST_TEST_TRAIT_SAME(typename inherit<F, X>::result_type, typename X::result_type);
|
||||
}
|
||||
|
||||
int main()
|
||||
|
Reference in New Issue
Block a user