File indexing completed on 2025-01-18 09:41:38
0001
0002 #ifndef BOOST_MPL_AUX_PUSH_BACK_IMPL_HPP_INCLUDED
0003 #define BOOST_MPL_AUX_PUSH_BACK_IMPL_HPP_INCLUDED
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #include <boost/mpl/push_back_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_back_arg {};
0029
0030
0031
0032 template< typename Tag >
0033 struct push_back_impl
0034 {
0035 template< typename Sequence, typename T > struct apply
0036 {
0037
0038
0039
0040 BOOST_MPL_ASSERT_MSG(
0041 ( boost::is_same< T, has_push_back_arg >::value )
0042 , REQUESTED_PUSH_BACK_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST
0043 , ( Sequence )
0044 );
0045 };
0046 };
0047
0048 template< typename Tag >
0049 struct has_push_back_impl
0050 {
0051 template< typename Seq > struct apply
0052 #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
0053 : aux::has_type< push_back< Seq, has_push_back_arg > >
0054 {
0055 #else
0056 {
0057 typedef aux::has_type< push_back< Seq, has_push_back_arg > > type;
0058 BOOST_STATIC_CONSTANT(bool, value =
0059 (aux::has_type< push_back< Seq, has_push_back_arg > >::value)
0060 );
0061 #endif
0062 };
0063 };
0064
0065 BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2, push_back_impl)
0066 BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, has_push_back_impl)
0067
0068 }}
0069
0070 #endif