File indexing completed on 2025-01-18 09:41:55
0001
0002 #ifndef BOOST_MPL_EMPTY_BASE_HPP_INCLUDED
0003 #define BOOST_MPL_EMPTY_BASE_HPP_INCLUDED
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #include <boost/mpl/bool.hpp>
0018 #include <boost/mpl/aux_/config/msvc.hpp>
0019 #include <boost/mpl/aux_/config/workaround.hpp>
0020 #include <boost/mpl/aux_/lambda_support.hpp>
0021
0022 #include <boost/type_traits/integral_constant.hpp>
0023 #include <boost/type_traits/is_empty.hpp>
0024
0025 namespace boost { namespace mpl {
0026
0027
0028
0029
0030 struct empty_base {};
0031
0032 template< typename T >
0033 struct is_empty_base
0034 : false_
0035 {
0036 #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
0037 using false_::value;
0038 #endif
0039 };
0040
0041 template<>
0042 struct is_empty_base<empty_base>
0043 : true_
0044 {
0045 #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
0046 using true_::value;
0047 #endif
0048 };
0049
0050 }}
0051
0052 namespace boost {
0053
0054 template<> struct is_empty< mpl::empty_base >
0055 : public ::boost::integral_constant<bool,true>
0056 {
0057 public:
0058 BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,is_empty,(mpl::empty_base))
0059 };
0060
0061 }
0062
0063 #endif