File indexing completed on 2025-01-18 09:41:38
0001
0002 #ifndef BOOST_MPL_AUX_PUSH_FRONT_IMPL_HPP_INCLUDED
0003 #define BOOST_MPL_AUX_PUSH_FRONT_IMPL_HPP_INCLUDED
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #include <boost/mpl/push_front_fwd.hpp>
0018 #include <boost/mpl/assert.hpp>
0019 #include <boost/mpl/aux_/has_type.hpp>
0020 #include <boost/mpl/aux_/traits_lambda_spec.hpp>
0021 #include <boost/mpl/aux_/config/forwarding.hpp>
0022 #include <boost/mpl/aux_/config/static_constant.hpp>
0023
0024 #include <boost/type_traits/is_same.hpp>
0025
0026 namespace boost { namespace mpl {
0027
0028 struct has_push_front_arg {};
0029
0030
0031
0032
0033 template< typename Tag >
0034 struct push_front_impl
0035 {
0036 template< typename Sequence, typename T > struct apply
0037 {
0038
0039
0040
0041 BOOST_MPL_ASSERT_MSG(
0042 ( boost::is_same< T, has_push_front_arg >::value )
0043 , REQUESTED_PUSH_FRONT_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST
0044 , ( Sequence )
0045 );
0046 };
0047 };
0048
0049 template< typename Tag >
0050 struct has_push_front_impl
0051 {
0052 template< typename Seq > struct apply
0053 #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
0054 : aux::has_type< push_front< Seq, has_push_front_arg > >
0055 {
0056 #else
0057 {
0058 typedef aux::has_type< push_front< Seq, has_push_front_arg > > type;
0059 BOOST_STATIC_CONSTANT(bool, value =
0060 (aux::has_type< push_front< Seq, has_push_front_arg > >::value)
0061 );
0062 #endif
0063 };
0064 };
0065
0066 BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2, push_front_impl)
0067 BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, has_push_front_impl)
0068
0069 }}
0070
0071 #endif