PageRenderTime 68ms CodeModel.GetById 61ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/Src/Dependencies/Boost/boost/mpl/empty_base.hpp

http://hadesmem.googlecode.com/
C++ Header | 59 lines | 31 code | 14 blank | 14 comment | 0 complexity | b49c65875eb867acac3f69a751470fc6 MD5 | raw file
 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-11 17:19:02 +1100 (Sat, 11 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
26namespace 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
31struct empty_base {};
32
33template< typename T >
34struct is_empty_base
35    : false_
36{
37#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
38    using false_::value;
39#endif
40};
41
42template<>
43struct 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
53namespace boost {
54BOOST_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