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