Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:48:04

0001 
0002 #ifndef BOOST_MPL_SAME_AS_HPP_INCLUDED
0003 #define BOOST_MPL_SAME_AS_HPP_INCLUDED
0004 
0005 // Copyright Aleksey Gurtovoy 2000-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/not.hpp>
0018 #include <boost/mpl/aux_/lambda_spec.hpp>
0019 #include <boost/mpl/aux_/config/forwarding.hpp>
0020 
0021 #include <boost/type_traits/is_same.hpp>
0022 
0023 namespace boost { namespace mpl {
0024 
0025 template< typename T1 >
0026 struct same_as
0027 {
0028     template< typename T2 > struct apply
0029 #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
0030         : is_same<T1,T2>
0031     {
0032 #else
0033     {
0034         typedef typename is_same<T1,T2>::type type;
0035 #endif
0036     };
0037 };
0038 
0039 template< typename T1 >
0040 struct not_same_as
0041 {
0042     template< typename T2 > struct apply
0043 #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
0044         : not_< is_same<T1,T2> >
0045     {
0046 #else
0047     {
0048         typedef typename not_< is_same<T1,T2> >::type type;
0049 #endif
0050     };
0051 };
0052 
0053 }}
0054 
0055 #endif // BOOST_MPL_SAME_AS_HPP_INCLUDED