]> git.lyx.org Git - lyx.git/blob - boost/boost/mpl/void.hpp
Boost 1.31.0
[lyx.git] / boost / boost / mpl / void.hpp
1
2 #ifndef BOOST_MPL_VOID_HPP_INCLUDED
3 #define BOOST_MPL_VOID_HPP_INCLUDED
4
5 // + file: boost/mpl/void.hpp
6 // + last modified: 05/may/03
7
8 // Copyright (c) 2001-03
9 // Peter Dimov, Aleksey Gurtovoy
10 //
11 // Permission to use, copy, modify, distribute and sell this software
12 // and its documentation for any purpose is hereby granted without fee, 
13 // provided that the above copyright notice appears in all copies and 
14 // that both the copyright notice and this permission notice appear in 
15 // supporting documentation. No representations are made about the 
16 // suitability of this software for any purpose. It is provided "as is" 
17 // without express or implied warranty.
18 //
19 // See http://www.boost.org/libs/mpl for documentation.
20
21 #include "boost/mpl/void_fwd.hpp"
22 #include "boost/mpl/bool.hpp"
23 #include "boost/mpl/aux_/config/msvc.hpp"
24 #include "boost/mpl/aux_/config/workaround.hpp"
25
26 namespace boost {
27 namespace mpl {
28
29 //  [JDG Feb-4-2003] made void_ a complete type to allow it to be
30 //  instantiated so that it can be passed in as an object that can be
31 //  used to select an overloaded function. Possible use includes signaling
32 //  a zero arity functor evaluation call.
33 struct void_ { typedef void_ type; };
34
35 template< typename T >
36 struct is_void_
37     : false_
38 {
39 #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
40     using false_::value;
41 #endif
42 };
43
44 template<>
45 struct is_void_<void_>
46     : true_
47 {
48 #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
49     using true_::value;
50 #endif
51 };
52
53 } // namespace mpl
54 } // namespace boost
55
56 #endif // BOOST_MPL_VOID_HPP_INCLUDED