Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:57:05

0001 
0002 #ifndef BOOST_MPL_AUX_NA_HPP_INCLUDED
0003 #define BOOST_MPL_AUX_NA_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/bool.hpp>
0018 #include <boost/mpl/aux_/na_fwd.hpp>
0019 #include <boost/mpl/aux_/config/msvc.hpp>
0020 #include <boost/mpl/aux_/config/ctps.hpp>
0021 
0022 namespace boost { namespace mpl {
0023 
0024 template< typename T >
0025 struct is_na
0026     : false_
0027 {
0028 #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
0029     using false_::value;
0030 #endif
0031 };
0032 
0033 template<>
0034 struct is_na<na>
0035     : true_
0036 {
0037 #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
0038     using true_::value;
0039 #endif
0040 };
0041 
0042 template< typename T >
0043 struct is_not_na
0044     : true_
0045 {
0046 #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
0047     using true_::value;
0048 #endif
0049 };
0050 
0051 template<>
0052 struct is_not_na<na>
0053     : false_
0054 {
0055 #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
0056     using false_::value;
0057 #endif
0058 };
0059 
0060 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
0061 template< typename T, typename U > struct if_na
0062 {
0063     typedef T type;
0064 };
0065 
0066 template< typename U > struct if_na<na,U>
0067 {
0068     typedef U type;
0069 };
0070 #else
0071 template< typename T > struct if_na_impl
0072 {
0073     template< typename U > struct apply
0074     {
0075         typedef T type;
0076     };
0077 };
0078 
0079 template<> struct if_na_impl<na>
0080 {
0081     template< typename U > struct apply
0082     {
0083         typedef U type;
0084     };
0085 };
0086 
0087 template< typename T, typename U > struct if_na
0088     : if_na_impl<T>::template apply<U>
0089 {
0090 };
0091 #endif
0092 
0093 }}
0094 
0095 #endif // BOOST_MPL_AUX_NA_HPP_INCLUDED