diff --git a/include/boost/mpl/aux_/inserter_algorithm.hpp b/include/boost/mpl/aux_/inserter_algorithm.hpp index fe1a095..20ae816 100644 --- a/include/boost/mpl/aux_/inserter_algorithm.hpp +++ b/include/boost/mpl/aux_/inserter_algorithm.hpp @@ -49,7 +49,7 @@ template< \ BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \ > \ struct name< BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P),na > \ - : if_< has_push_back \ + : if_< has_push_back< typename clear::type> \ , aux::name##_impl< \ BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \ , back_inserter< typename clear::type > \ diff --git a/include/boost/mpl/aux_/push_back_impl.hpp b/include/boost/mpl/aux_/push_back_impl.hpp index 3d8d5fe..3ece711 100644 --- a/include/boost/mpl/aux_/push_back_impl.hpp +++ b/include/boost/mpl/aux_/push_back_impl.hpp @@ -25,8 +25,7 @@ namespace boost { namespace mpl { -template< typename Tag > -struct has_push_back_impl; +struct has_push_back_arg; // agurt 05/feb/04: no default implementation; the stub definition is needed // to enable the default 'has_push_back' implementation below @@ -39,7 +38,7 @@ struct push_back_impl // if you've got an assert here, you are requesting a 'push_back' // specialization that doesn't exist. BOOST_MPL_ASSERT_MSG( - ( boost::is_same< T, has_push_back_impl >::value ) + ( boost::is_same< T, has_push_back_arg >::value ) , REQUESTED_PUSH_BACK_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST , ( Sequence ) ); @@ -51,13 +50,13 @@ struct has_push_back_impl { template< typename Seq > struct apply #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) - : aux::has_type< push_back< Seq, has_push_back_impl > > + : aux::has_type< push_back< Seq, has_push_back_arg > > { #else { - typedef aux::has_type< push_back< Seq, has_push_back_impl > > type; + typedef aux::has_type< push_back< Seq, has_push_back_arg > > type; BOOST_STATIC_CONSTANT(bool, value = - (aux::has_type< push_back< Seq, has_push_back_impl > >::value) + (aux::has_type< push_back< Seq, has_push_back_arg > >::value) ); #endif }; diff --git a/include/boost/mpl/aux_/push_front_impl.hpp b/include/boost/mpl/aux_/push_front_impl.hpp index 2473a8b..4010532 100644 --- a/include/boost/mpl/aux_/push_front_impl.hpp +++ b/include/boost/mpl/aux_/push_front_impl.hpp @@ -25,8 +25,7 @@ namespace boost { namespace mpl { -template< typename Tag > -struct has_push_front_impl; +struct has_push_front_arg; // agurt 05/feb/04: no default implementation; the stub definition is needed // to enable the default 'has_push_front' implementation below @@ -40,7 +39,7 @@ struct push_front_impl // if you've got an assert here, you are requesting a 'push_front' // specialization that doesn't exist. BOOST_MPL_ASSERT_MSG( - ( boost::is_same< T, has_push_front_impl >::value ) + ( boost::is_same< T, has_push_front_arg >::value ) , REQUESTED_PUSH_FRONT_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST , ( Sequence ) ); @@ -52,13 +51,13 @@ struct has_push_front_impl { template< typename Seq > struct apply #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) - : aux::has_type< push_front< Seq, has_push_front_impl > > + : aux::has_type< push_front< Seq, has_push_front_arg > > { #else { - typedef aux::has_type< push_front< Seq, has_push_front_impl > > type; + typedef aux::has_type< push_front< Seq, has_push_front_arg > > type; BOOST_STATIC_CONSTANT(bool, value = - (aux::has_type< push_front< Seq, has_push_front_impl > >::value) + (aux::has_type< push_front< Seq, has_push_front_arg > >::value) ); #endif }; diff --git a/include/boost/mpl/for_each.hpp b/include/boost/mpl/for_each.hpp index 21d63ed..1feadc9 100644 --- a/include/boost/mpl/for_each.hpp +++ b/include/boost/mpl/for_each.hpp @@ -76,7 +76,7 @@ struct for_each_impl typedef typename mpl::next::type iter; for_each_impl::value> - ::execute((iter*)0, (LastIterator*)0, (TransformFunc*)0, f); + ::execute( static_cast(0), static_cast(0), static_cast(0), f); } }; @@ -98,7 +98,7 @@ void for_each(F f, Sequence* = 0, TransformOp* = 0) typedef typename end::type last; aux::for_each_impl< boost::is_same::value > - ::execute((first*)0, (last*)0, (TransformOp*)0, f); + ::execute(static_cast(0), static_cast(0), static_cast(0), f); } template< diff --git a/include/boost/mpl/string.hpp b/include/boost/mpl/string.hpp index 22c71cb..6a9481a 100644 --- a/include/boost/mpl/string.hpp +++ b/include/boost/mpl/string.hpp @@ -44,7 +44,6 @@ #include #include #include -#include #include // for bidirectional_iterator_tag #include @@ -499,6 +498,7 @@ namespace boost { namespace mpl , back_ = BOOST_PP_CAT(C, BOOST_PP_DEC(BOOST_MPL_STRING_MAX_PARAMS)) }; + typedef char value_type; typedef string type; typedef string_tag tag; }; @@ -541,11 +541,11 @@ namespace boost { namespace mpl #undef M0 typedef c_str type; - static char const value[]; + static typename Sequence::value_type const value[BOOST_MPL_LIMIT_STRING_SIZE+1]; }; template - char const c_str::value[] = + typename Sequence::value_type const c_str::value[BOOST_MPL_LIMIT_STRING_SIZE+1] = { #define M0(z, n, data) \ mpl::aux_::deref_unless::type::value,