File indexing completed on 2025-01-18 09:41:37
0001
0002 #ifndef BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED
0003 #define BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #include <boost/mpl/aux_/config/msvc.hpp>
0018 #include <boost/mpl/aux_/config/intel.hpp>
0019 #include <boost/mpl/aux_/config/workaround.hpp>
0020
0021 #if BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION)
0022 # include <boost/mpl/has_xxx.hpp>
0023 #elif BOOST_WORKAROUND(BOOST_MSVC, < 1300)
0024 # include <boost/mpl/has_xxx.hpp>
0025 # include <boost/mpl/if.hpp>
0026 # include <boost/mpl/bool.hpp>
0027 # include <boost/mpl/aux_/msvc_is_class.hpp>
0028 #elif BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x610))
0029 # include <boost/mpl/if.hpp>
0030 # include <boost/mpl/bool.hpp>
0031 # include <boost/mpl/aux_/yes_no.hpp>
0032 # include <boost/mpl/aux_/config/static_constant.hpp>
0033 # include <boost/type_traits/is_class.hpp>
0034 #else
0035 # include <boost/mpl/aux_/type_wrapper.hpp>
0036 # include <boost/mpl/aux_/yes_no.hpp>
0037 # include <boost/mpl/aux_/config/static_constant.hpp>
0038 #endif
0039
0040 namespace boost { namespace mpl { namespace aux {
0041
0042 #if BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION)
0043
0044 BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind, rebind, false)
0045
0046 #elif BOOST_WORKAROUND(BOOST_MSVC, < 1300)
0047
0048 BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind_impl, rebind, false)
0049
0050 template< typename T >
0051 struct has_rebind
0052 : if_<
0053 msvc_is_class<T>
0054 , has_rebind_impl<T>
0055 , bool_<false>
0056 >::type
0057 {
0058 };
0059
0060 #else
0061
0062 template< typename T > struct has_rebind_tag {};
0063 no_tag operator|(has_rebind_tag<int>, void const volatile*);
0064
0065 # if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x610))
0066 template< typename T >
0067 struct has_rebind
0068 {
0069 static has_rebind_tag<T>* get();
0070 BOOST_STATIC_CONSTANT(bool, value =
0071 sizeof(has_rebind_tag<int>() | get()) == sizeof(yes_tag)
0072 );
0073 };
0074 # else
0075 template< typename T >
0076 struct has_rebind_impl
0077 {
0078 static T* get();
0079 BOOST_STATIC_CONSTANT(bool, value =
0080 sizeof(has_rebind_tag<int>() | get()) == sizeof(yes_tag)
0081 );
0082 };
0083
0084 template< typename T >
0085 struct has_rebind
0086 : if_<
0087 is_class<T>
0088 , has_rebind_impl<T>
0089 , bool_<false>
0090 >::type
0091 {
0092 };
0093 # endif
0094
0095 #endif
0096
0097 }}}
0098
0099 #endif