~ubuntu-branches/ubuntu/warty/aqsis/warty

« back to all changes in this revision

Viewing changes to boost/boost/mpl/empty_base.hpp

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2004-08-24 07:25:04 UTC
  • Revision ID: james.westby@ubuntu.com-20040824072504-zf993vnevvisdsvb
Tags: upstream-0.9.1
ImportĀ upstreamĀ versionĀ 0.9.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//-----------------------------------------------------------------------------
 
2
// boost mpl/empty_base.hpp header file
 
3
// See http://www.boost.org for updates, documentation, and revision history.
 
4
//-----------------------------------------------------------------------------
 
5
//
 
6
// Copyright (c) 2001-02
 
7
// Aleksey Gurtovoy
 
8
//
 
9
// Permission to use, copy, modify, distribute and sell this software
 
10
// and its documentation for any purpose is hereby granted without fee, 
 
11
// provided that the above copyright notice appears in all copies and 
 
12
// that both the copyright notice and this permission notice appear in 
 
13
// supporting documentation. No representations are made about the 
 
14
// suitability of this software for any purpose. It is provided "as is" 
 
15
// without express or implied warranty.
 
16
 
 
17
#ifndef BOOST_MPL_EMPTY_BASE_HPP_INCLUDED
 
18
#define BOOST_MPL_EMPTY_BASE_HPP_INCLUDED
 
19
 
 
20
#include "boost/type_traits/is_empty.hpp"
 
21
#include "boost/mpl/bool.hpp"
 
22
#include "boost/config.hpp"
 
23
 
 
24
// should be always the last #include directive
 
25
#include "boost/type_traits/detail/bool_trait_def.hpp"
 
26
 
 
27
namespace boost {
 
28
namespace mpl {
 
29
 
 
30
// empty base class, guaranteed to have no members; inheritance from
 
31
// 'empty_base' through the 'inherit' metafunction is a no-op - see 
 
32
// "mpl/inherit.hpp" header for the details
 
33
struct empty_base {};
 
34
 
 
35
template< typename T >
 
36
struct is_empty_base
 
37
    : false_
 
38
{
 
39
#if defined(BOOST_MSVC) && BOOST_MSVC < 1300
 
40
    using false_::value;
 
41
#endif
 
42
};
 
43
 
 
44
template<>
 
45
struct is_empty_base<empty_base>
 
46
    : true_
 
47
{
 
48
#if defined(BOOST_MSVC) && BOOST_MSVC < 1300
 
49
    using true_::value;
 
50
#endif
 
51
};
 
52
 
 
53
} // namespace mpl
 
54
 
 
55
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_empty, mpl::empty_base, true)
 
56
 
 
57
} // namespace boost
 
58
 
 
59
#include "boost/type_traits/detail/bool_trait_undef.hpp"
 
60
 
 
61
#endif // BOOST_MPL_EMPTY_BASE_HPP_INCLUDED