2 #ifndef BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED
\r
3 #define BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED
\r
5 // Copyright Aleksey Gurtovoy 2002-2004
\r
7 // Distributed under the Boost Software License, Version 1.0.
\r
8 // (See accompanying file LICENSE_1_0.txt or copy at
\r
9 // http://www.boost.org/LICENSE_1_0.txt)
\r
11 // See http://www.boost.org/libs/mpl for documentation.
\r
13 // $Id: has_rebind.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
\r
14 // $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
\r
15 // $Revision: 49267 $
\r
17 #include <boost/mpl/aux_/config/msvc.hpp>
\r
18 #include <boost/mpl/aux_/config/intel.hpp>
\r
19 #include <boost/mpl/aux_/config/workaround.hpp>
\r
21 #if BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION)
\r
22 # include <boost/mpl/has_xxx.hpp>
\r
23 #elif BOOST_WORKAROUND(BOOST_MSVC, < 1300)
\r
24 # include <boost/mpl/has_xxx.hpp>
\r
25 # include <boost/mpl/if.hpp>
\r
26 # include <boost/mpl/bool.hpp>
\r
27 # include <boost/mpl/aux_/msvc_is_class.hpp>
\r
28 #elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
\r
29 # include <boost/mpl/if.hpp>
\r
30 # include <boost/mpl/bool.hpp>
\r
31 # include <boost/mpl/aux_/yes_no.hpp>
\r
32 # include <boost/mpl/aux_/config/static_constant.hpp>
\r
33 # include <boost/type_traits/is_class.hpp>
\r
35 # include <boost/mpl/aux_/type_wrapper.hpp>
\r
36 # include <boost/mpl/aux_/yes_no.hpp>
\r
37 # include <boost/mpl/aux_/config/static_constant.hpp>
\r
40 namespace boost { namespace mpl { namespace aux {
\r
42 #if BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION)
\r
44 BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind, rebind, false)
\r
46 #elif BOOST_WORKAROUND(BOOST_MSVC, < 1300)
\r
48 BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind_impl, rebind, false)
\r
50 template< typename T >
\r
54 , has_rebind_impl<T>
\r
62 template< typename T > struct has_rebind_tag {};
\r
63 no_tag operator|(has_rebind_tag<int>, void const volatile*);
\r
65 # if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
\r
66 template< typename T >
\r
69 static has_rebind_tag<T>* get();
\r
70 BOOST_STATIC_CONSTANT(bool, value =
\r
71 sizeof(has_rebind_tag<int>() | get()) == sizeof(yes_tag)
\r
74 # else // __BORLANDC__
\r
75 template< typename T >
\r
76 struct has_rebind_impl
\r
79 BOOST_STATIC_CONSTANT(bool, value =
\r
80 sizeof(has_rebind_tag<int>() | get()) == sizeof(yes_tag)
\r
84 template< typename T >
\r
88 , has_rebind_impl<T>
\r
93 # endif // __BORLANDC__
\r
99 #endif // BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED
\r