Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:41:44

0001 
0002 #ifndef BOOST_MPL_SET_AUX_HAS_KEY_IMPL_HPP_INCLUDED
0003 #define BOOST_MPL_SET_AUX_HAS_KEY_IMPL_HPP_INCLUDED
0004 
0005 // Copyright Aleksey Gurtovoy 2003-2004
0006 // Copyright David Abrahams 2003-2004
0007 //
0008 // Distributed under the Boost Software License, Version 1.0. 
0009 // (See accompanying file LICENSE_1_0.txt or copy at 
0010 // http://www.boost.org/LICENSE_1_0.txt)
0011 //
0012 // See http://www.boost.org/libs/mpl for documentation.
0013 
0014 // $Id$
0015 // $Date$
0016 // $Revision$
0017 
0018 #include <boost/mpl/set/aux_/tag.hpp>
0019 #include <boost/mpl/has_key_fwd.hpp>
0020 #include <boost/mpl/bool.hpp>
0021 #include <boost/mpl/aux_/overload_names.hpp>
0022 #include <boost/mpl/aux_/static_cast.hpp>
0023 #include <boost/mpl/aux_/yes_no.hpp>
0024 #include <boost/mpl/aux_/type_wrapper.hpp>
0025 #include <boost/mpl/aux_/config/workaround.hpp>
0026 #include <boost/mpl/aux_/config/static_constant.hpp>
0027 
0028 namespace boost { namespace mpl {
0029 
0030 template<>
0031 struct has_key_impl< aux::set_tag >
0032 {
0033     template< typename Set, typename T > struct apply
0034 #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \
0035     || BOOST_WORKAROUND(__EDG_VERSION__, <= 245)
0036     {
0037         BOOST_STATIC_CONSTANT(bool, value = 
0038               ( sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED(
0039                     Set
0040                   , BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper<T>*, 0)
0041                   ) ) == sizeof(aux::no_tag) )
0042             );
0043 
0044         typedef bool_<value> type;
0045 
0046 #else // ISO98 C++
0047         : bool_< 
0048               ( sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED(
0049                     Set
0050                   , BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper<T>*, 0)
0051                   ) ) == sizeof(aux::no_tag) )
0052             >
0053     {
0054 #endif
0055     };
0056 };
0057 
0058 }}
0059 
0060 #endif // BOOST_MPL_SET_AUX_HAS_KEY_IMPL_HPP_INCLUDED