Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-15 09:57:31

0001 
0002 #ifndef BOOST_MPL_VOID_HPP_INCLUDED
0003 #define BOOST_MPL_VOID_HPP_INCLUDED
0004 
0005 // Copyright Aleksey Gurtovoy 2001-2004
0006 //
0007 // Distributed under the Boost Software License, Version 1.0. 
0008 // (See accompanying file LICENSE_1_0.txt or copy at 
0009 // http://www.boost.org/LICENSE_1_0.txt)
0010 //
0011 // See http://www.boost.org/libs/mpl for documentation.
0012 
0013 // $Id$
0014 // $Date$
0015 // $Revision$
0016 
0017 #include <boost/mpl/void_fwd.hpp>
0018 #include <boost/mpl/bool.hpp>
0019 #include <boost/mpl/aux_/na_spec.hpp>
0020 #include <boost/mpl/aux_/config/msvc.hpp>
0021 #include <boost/mpl/aux_/config/workaround.hpp>
0022 
0023 BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
0024 
0025 //  [JDG Feb-4-2003] made void_ a complete type to allow it to be
0026 //  instantiated so that it can be passed in as an object that can be
0027 //  used to select an overloaded function. Possible use includes signaling
0028 //  a zero arity functor evaluation call.
0029 struct void_ { typedef void_ type; };
0030 
0031 BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
0032 
0033 namespace boost { namespace mpl {
0034 
0035 template< typename T >
0036 struct is_void_
0037     : false_
0038 {
0039 #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
0040     using false_::value;
0041 #endif
0042 };
0043 
0044 template<>
0045 struct is_void_<void_>
0046     : true_
0047 {
0048 #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
0049     using true_::value;
0050 #endif
0051 };
0052 
0053 template< typename T >
0054 struct is_not_void_
0055     : true_
0056 {
0057 #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
0058     using true_::value;
0059 #endif
0060 };
0061 
0062 template<>
0063 struct is_not_void_<void_>
0064     : false_
0065 {
0066 #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
0067     using false_::value;
0068 #endif
0069 };
0070 
0071 BOOST_MPL_AUX_NA_SPEC(1, is_void_)
0072 BOOST_MPL_AUX_NA_SPEC(1, is_not_void_)
0073 
0074 }}
0075 
0076 #endif // BOOST_MPL_VOID_HPP_INCLUDED