mirror of
https://github.com/boostorg/mpl.git
synced 2025-07-31 21:34:44 +02:00
Remove reliance on deprecated type_traits headers. Fixed apply test.
This commit is contained in:
@@ -17,12 +17,10 @@
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||
|
||||
#include <boost/type_traits/is_empty.hpp>
|
||||
|
||||
// should be always the last #include directive
|
||||
#include <boost/type_traits/detail/bool_trait_def.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
// empty base class, guaranteed to have no members; inheritance from
|
||||
@@ -51,9 +49,14 @@ struct is_empty_base<empty_base>
|
||||
}}
|
||||
|
||||
namespace boost {
|
||||
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_empty, mpl::empty_base, true)
|
||||
|
||||
template<> struct is_empty< mpl::empty_base >
|
||||
: public ::boost::integral_constant<bool,true>
|
||||
{
|
||||
public:
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,is_empty,(mpl::empty_base))
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#include <boost/type_traits/detail/bool_trait_undef.hpp>
|
||||
|
||||
#endif // BOOST_MPL_EMPTY_BASE_HPP_INCLUDED
|
||||
|
@@ -76,7 +76,7 @@ MPL_TEST_CASE()
|
||||
|
||||
typedef apply1< _1, std_vector<_1> >::type v_lambda;
|
||||
typedef apply1<v_lambda,int>::type v_int;
|
||||
MPL_ASSERT(( is_same< v,std_vector<int> > ));
|
||||
MPL_ASSERT(( is_same< v_int,std_vector<int> > ));
|
||||
}
|
||||
|
||||
MPL_TEST_CASE()
|
||||
@@ -86,7 +86,7 @@ MPL_TEST_CASE()
|
||||
|
||||
typedef apply1< lambda<_1>, std_vector<_1> >::type make_vector;
|
||||
typedef apply_wrap1< make_vector,int >::type v_int;
|
||||
MPL_ASSERT(( is_same< v,std_vector<int> > ));
|
||||
MPL_ASSERT(( is_same< v_int,std_vector<int> > ));
|
||||
}
|
||||
|
||||
MPL_TEST_CASE()
|
||||
|
Reference in New Issue
Block a user