1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/boost/mpl/aux_/na.hpp Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,95 @@
1.4 +
1.5 +#ifndef BOOST_MPL_AUX_NA_HPP_INCLUDED
1.6 +#define BOOST_MPL_AUX_NA_HPP_INCLUDED
1.7 +
1.8 +// Copyright Aleksey Gurtovoy 2001-2004
1.9 +//
1.10 +// Distributed under the Boost Software License, Version 1.0.
1.11 +// (See accompanying file LICENSE_1_0.txt or copy at
1.12 +// http://www.boost.org/LICENSE_1_0.txt)
1.13 +//
1.14 +// See http://www.boost.org/libs/mpl for documentation.
1.15 +
1.16 +// $Source: /cvsroot/boost/boost/boost/mpl/aux_/na.hpp,v $
1.17 +// $Date: 2004/11/28 01:37:30 $
1.18 +// $Revision: 1.6 $
1.19 +
1.20 +#include <boost/mpl/bool.hpp>
1.21 +#include <boost/mpl/aux_/na_fwd.hpp>
1.22 +#include <boost/mpl/aux_/config/msvc.hpp>
1.23 +#include <boost/mpl/aux_/config/ctps.hpp>
1.24 +
1.25 +namespace boost { namespace mpl {
1.26 +
1.27 +template< typename T >
1.28 +struct is_na
1.29 + : false_
1.30 +{
1.31 +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
1.32 + using false_::value;
1.33 +#endif
1.34 +};
1.35 +
1.36 +template<>
1.37 +struct is_na<na>
1.38 + : true_
1.39 +{
1.40 +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
1.41 + using true_::value;
1.42 +#endif
1.43 +};
1.44 +
1.45 +template< typename T >
1.46 +struct is_not_na
1.47 + : true_
1.48 +{
1.49 +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
1.50 + using true_::value;
1.51 +#endif
1.52 +};
1.53 +
1.54 +template<>
1.55 +struct is_not_na<na>
1.56 + : false_
1.57 +{
1.58 +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
1.59 + using false_::value;
1.60 +#endif
1.61 +};
1.62 +
1.63 +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
1.64 +template< typename T, typename U > struct if_na
1.65 +{
1.66 + typedef T type;
1.67 +};
1.68 +
1.69 +template< typename U > struct if_na<na,U>
1.70 +{
1.71 + typedef U type;
1.72 +};
1.73 +#else
1.74 +template< typename T > struct if_na_impl
1.75 +{
1.76 + template< typename U > struct apply
1.77 + {
1.78 + typedef T type;
1.79 + };
1.80 +};
1.81 +
1.82 +template<> struct if_na_impl<na>
1.83 +{
1.84 + template< typename U > struct apply
1.85 + {
1.86 + typedef U type;
1.87 + };
1.88 +};
1.89 +
1.90 +template< typename T, typename U > struct if_na
1.91 + : if_na_impl<T>::template apply<U>
1.92 +{
1.93 +};
1.94 +#endif
1.95 +
1.96 +}}
1.97 +
1.98 +#endif // BOOST_MPL_AUX_NA_HPP_INCLUDED