Back to home page

EIC code displayed by LXR

 
 

    


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 // Copyright Aleksey Gurtovoy 2001-2004
0006 //
0007 // Distributed under the Boost Software License, Version 1.0. 
0008 // (See accompanying file LICENSE_1_0.txt or copy at 
0009 // http://www.boost.org/LICENSE_1_0.txt)
0010 //
0011 // See http://www.boost.org/libs/mpl for documentation.
0012 
0013 // $Id$
0014 // $Date$
0015 // $Revision$
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 // empty base class, guaranteed to have no members; inheritance from
0028 // 'empty_base' through the 'inherit' metafunction is a no-op - see 
0029 // "mpl/inherit.hpp> header for the details
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 // BOOST_MPL_EMPTY_BASE_HPP_INCLUDED