File indexing completed on 2025-01-18 09:41:38
0001
0002 #ifndef BOOST_MPL_O1_SIZE_IMPL_HPP_INCLUDED
0003 #define BOOST_MPL_O1_SIZE_IMPL_HPP_INCLUDED
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #include <boost/mpl/O1_size_fwd.hpp>
0018 #include <boost/mpl/long.hpp>
0019 #include <boost/mpl/if.hpp>
0020 #include <boost/mpl/aux_/has_size.hpp>
0021 #include <boost/mpl/aux_/config/forwarding.hpp>
0022 #include <boost/mpl/aux_/config/static_constant.hpp>
0023 #include <boost/mpl/aux_/config/msvc.hpp>
0024 #include <boost/mpl/aux_/config/workaround.hpp>
0025
0026 namespace boost { namespace mpl {
0027
0028
0029
0030
0031
0032 # if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) \
0033 && !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))
0034
0035 namespace aux {
0036 template< typename Sequence > struct O1_size_impl
0037 : Sequence::size
0038 {
0039 };
0040 }
0041
0042 template< typename Tag >
0043 struct O1_size_impl
0044 {
0045 template< typename Sequence > struct apply
0046 #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
0047 : if_<
0048 aux::has_size<Sequence>
0049 , aux::O1_size_impl<Sequence>
0050 , long_<-1>
0051 >::type
0052 {
0053 #else
0054 {
0055 typedef typename if_<
0056 aux::has_size<Sequence>
0057 , aux::O1_size_impl<Sequence>
0058 , long_<-1>
0059 >::type type;
0060
0061 BOOST_STATIC_CONSTANT(long, value =
0062 (if_<
0063 aux::has_size<Sequence>
0064 , aux::O1_size_impl<Sequence>
0065 , long_<-1>
0066 >::type::value)
0067 );
0068 #endif
0069 };
0070 };
0071
0072 # else
0073
0074 template< typename Tag >
0075 struct O1_size_impl
0076 {
0077 template< typename Sequence > struct apply
0078 : long_<-1>
0079 {
0080 };
0081 };
0082
0083 # endif
0084
0085 }}
0086
0087 #endif