]> git.lyx.org Git - lyx.git/blob - boost/boost/mpl/void.hpp
update boost to pre-1.30.0
[lyx.git] / boost / boost / mpl / void.hpp
1 //-----------------------------------------------------------------------------
2 // boost mpl/void.hpp header file
3 // See http://www.boost.org for updates, documentation, and revision history.
4 //-----------------------------------------------------------------------------
5 //
6 // Copyright (c) 2001-02
7 // Peter Dimov, 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_VOID_HPP_INCLUDED
18 #define BOOST_MPL_VOID_HPP_INCLUDED
19
20 #include "boost/mpl/bool.hpp"
21 #include "boost/config.hpp"
22
23 namespace boost {
24 namespace mpl {
25
26 //  [JDG Feb-4-2003] made void_ a complete type to allow it to be
27 //  instantiated so that it can be passed in as an object that can be
28 //  used to select an overloaded function. Possible use includes signaling
29 //  a zero arity functor evaluation call.
30 struct void_ {};
31
32 template< typename T >
33 struct is_void_
34     : false_
35 {
36 #if defined(BOOST_MSVC) && BOOST_MSVC < 1300
37     using false_::value;
38 #endif
39 };
40
41 template<>
42 struct is_void_<void_>
43     : true_
44 {
45 #if defined(BOOST_MSVC) && BOOST_MSVC < 1300
46     using true_::value;
47 #endif
48 };
49
50 } // namespace mpl
51 } // namespace boost
52
53 #endif // BOOST_MPL_VOID_HPP_INCLUDED