]> git.donarmstrong.com Git - rsem.git/blob - boost/mpl/empty_base.hpp
Updated boost to v1.55.0
[rsem.git] / boost / mpl / empty_base.hpp
1
2 #ifndef BOOST_MPL_EMPTY_BASE_HPP_INCLUDED
3 #define BOOST_MPL_EMPTY_BASE_HPP_INCLUDED
4
5 // Copyright Aleksey Gurtovoy 2001-2004
6 //
7 // Distributed under the Boost Software License, Version 1.0. 
8 // (See accompanying file LICENSE_1_0.txt or copy at 
9 // http://www.boost.org/LICENSE_1_0.txt)
10 //
11 // See http://www.boost.org/libs/mpl for documentation.
12
13 // $Id: empty_base.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
14 // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
15 // $Revision: 49267 $
16
17 #include <boost/mpl/bool.hpp>
18 #include <boost/mpl/aux_/config/msvc.hpp>
19 #include <boost/mpl/aux_/config/workaround.hpp>
20
21 #include <boost/type_traits/is_empty.hpp>
22
23 // should be always the last #include directive
24 #include <boost/type_traits/detail/bool_trait_def.hpp>
25
26 namespace boost { namespace mpl {
27
28 // empty base class, guaranteed to have no members; inheritance from
29 // 'empty_base' through the 'inherit' metafunction is a no-op - see 
30 // "mpl/inherit.hpp> header for the details
31 struct empty_base {};
32
33 template< typename T >
34 struct is_empty_base
35     : false_
36 {
37 #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
38     using false_::value;
39 #endif
40 };
41
42 template<>
43 struct is_empty_base<empty_base>
44     : true_
45 {
46 #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
47     using true_::value;
48 #endif
49 };
50
51 }}
52
53 namespace boost {
54 BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_empty, mpl::empty_base, true)
55 }
56
57 #include <boost/type_traits/detail/bool_trait_undef.hpp>
58
59 #endif // BOOST_MPL_EMPTY_BASE_HPP_INCLUDED