annotate DEPENDENCIES/generic/include/boost/mpl/aux_/has_rebind.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents c530137014c0
children
rev   line source
Chris@16 1
Chris@16 2 #ifndef BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED
Chris@16 3 #define BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED
Chris@16 4
Chris@16 5 // Copyright Aleksey Gurtovoy 2002-2004
Chris@16 6 //
Chris@16 7 // Distributed under the Boost Software License, Version 1.0.
Chris@16 8 // (See accompanying file LICENSE_1_0.txt or copy at
Chris@16 9 // http://www.boost.org/LICENSE_1_0.txt)
Chris@16 10 //
Chris@16 11 // See http://www.boost.org/libs/mpl for documentation.
Chris@16 12
Chris@101 13 // $Id$
Chris@101 14 // $Date$
Chris@101 15 // $Revision$
Chris@16 16
Chris@16 17 #include <boost/mpl/aux_/config/msvc.hpp>
Chris@16 18 #include <boost/mpl/aux_/config/intel.hpp>
Chris@16 19 #include <boost/mpl/aux_/config/workaround.hpp>
Chris@16 20
Chris@16 21 #if BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION)
Chris@16 22 # include <boost/mpl/has_xxx.hpp>
Chris@16 23 #elif BOOST_WORKAROUND(BOOST_MSVC, < 1300)
Chris@16 24 # include <boost/mpl/has_xxx.hpp>
Chris@16 25 # include <boost/mpl/if.hpp>
Chris@16 26 # include <boost/mpl/bool.hpp>
Chris@16 27 # include <boost/mpl/aux_/msvc_is_class.hpp>
Chris@16 28 #elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
Chris@16 29 # include <boost/mpl/if.hpp>
Chris@16 30 # include <boost/mpl/bool.hpp>
Chris@16 31 # include <boost/mpl/aux_/yes_no.hpp>
Chris@16 32 # include <boost/mpl/aux_/config/static_constant.hpp>
Chris@16 33 # include <boost/type_traits/is_class.hpp>
Chris@16 34 #else
Chris@16 35 # include <boost/mpl/aux_/type_wrapper.hpp>
Chris@16 36 # include <boost/mpl/aux_/yes_no.hpp>
Chris@16 37 # include <boost/mpl/aux_/config/static_constant.hpp>
Chris@16 38 #endif
Chris@16 39
Chris@16 40 namespace boost { namespace mpl { namespace aux {
Chris@16 41
Chris@16 42 #if BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION)
Chris@16 43
Chris@16 44 BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind, rebind, false)
Chris@16 45
Chris@16 46 #elif BOOST_WORKAROUND(BOOST_MSVC, < 1300)
Chris@16 47
Chris@16 48 BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind_impl, rebind, false)
Chris@16 49
Chris@16 50 template< typename T >
Chris@16 51 struct has_rebind
Chris@16 52 : if_<
Chris@16 53 msvc_is_class<T>
Chris@16 54 , has_rebind_impl<T>
Chris@16 55 , bool_<false>
Chris@16 56 >::type
Chris@16 57 {
Chris@16 58 };
Chris@16 59
Chris@16 60 #else // the rest
Chris@16 61
Chris@16 62 template< typename T > struct has_rebind_tag {};
Chris@16 63 no_tag operator|(has_rebind_tag<int>, void const volatile*);
Chris@16 64
Chris@16 65 # if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
Chris@16 66 template< typename T >
Chris@16 67 struct has_rebind
Chris@16 68 {
Chris@16 69 static has_rebind_tag<T>* get();
Chris@16 70 BOOST_STATIC_CONSTANT(bool, value =
Chris@16 71 sizeof(has_rebind_tag<int>() | get()) == sizeof(yes_tag)
Chris@16 72 );
Chris@16 73 };
Chris@16 74 # else // __BORLANDC__
Chris@16 75 template< typename T >
Chris@16 76 struct has_rebind_impl
Chris@16 77 {
Chris@16 78 static T* get();
Chris@16 79 BOOST_STATIC_CONSTANT(bool, value =
Chris@16 80 sizeof(has_rebind_tag<int>() | get()) == sizeof(yes_tag)
Chris@16 81 );
Chris@16 82 };
Chris@16 83
Chris@16 84 template< typename T >
Chris@16 85 struct has_rebind
Chris@16 86 : if_<
Chris@16 87 is_class<T>
Chris@16 88 , has_rebind_impl<T>
Chris@16 89 , bool_<false>
Chris@16 90 >::type
Chris@16 91 {
Chris@16 92 };
Chris@16 93 # endif // __BORLANDC__
Chris@16 94
Chris@16 95 #endif
Chris@16 96
Chris@16 97 }}}
Chris@16 98
Chris@16 99 #endif // BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED