From 6c9ec94781f8f9c1b2329b3d98746c40421d37d4 Mon Sep 17 00:00:00 2001 From: nobody Date: Thu, 1 Dec 2005 13:06:58 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create tag 'merged_to_RC_1_33_0'. [SVN r31853] --- include/boost/detail/is_incrementable.hpp | 22 +++++++- include/boost/detail/is_xxx.hpp | 61 +++++++++++++++++++++++ 2 files changed, 81 insertions(+), 2 deletions(-) create mode 100755 include/boost/detail/is_xxx.hpp diff --git a/include/boost/detail/is_incrementable.hpp b/include/boost/detail/is_incrementable.hpp index 5ec7c27..0ae4eca 100755 --- a/include/boost/detail/is_incrementable.hpp +++ b/include/boost/detail/is_incrementable.hpp @@ -32,8 +32,26 @@ namespace is_incrementable_ struct any { template any(T const&); }; // This is a last-resort operator++ for when none other is found +# if BOOST_WORKAROUND(__GNUC__, == 4) && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 2 + +} + +namespace is_incrementable_2 +{ + is_incrementable_::tag operator++(is_incrementable_::any const&); + is_incrementable_::tag operator++(is_incrementable_::any const&,int); +} +using namespace is_incrementable_2; + +namespace is_incrementable_ +{ + +# else + tag operator++(any const&); tag operator++(any const&,int); + +# endif # if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \ || BOOST_WORKAROUND(BOOST_MSVC, <= 1300) @@ -78,7 +96,7 @@ namespace is_incrementable_ template struct is_incrementable - BOOST_TT_AUX_BOOL_C_BASE(::boost::detail::is_incrementable_::impl::value) +BOOST_TT_AUX_BOOL_C_BASE(::boost::detail::is_incrementable_::impl::value) { BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(::boost::detail::is_incrementable_::impl::value) BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_incrementable,(T)) @@ -86,7 +104,7 @@ struct is_incrementable template struct is_postfix_incrementable - BOOST_TT_AUX_BOOL_C_BASE(::boost::detail::is_incrementable_::impl::value) +BOOST_TT_AUX_BOOL_C_BASE(::boost::detail::is_incrementable_::impl::value) { BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(::boost::detail::is_incrementable_::postfix_impl::value) BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_postfix_incrementable,(T)) diff --git a/include/boost/detail/is_xxx.hpp b/include/boost/detail/is_xxx.hpp new file mode 100755 index 0000000..cb64fb3 --- /dev/null +++ b/include/boost/detail/is_xxx.hpp @@ -0,0 +1,61 @@ +// Copyright David Abrahams 2005. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_DETAIL_IS_XXX_DWA20051011_HPP +# define BOOST_DETAIL_IS_XXX_DWA20051011_HPP + +# include +# include +# include + +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +# include +# include + +# define BOOST_DETAIL_IS_XXX_DEF(name, qualified_name, nargs) \ +template \ +struct is_##name \ +{ \ + typedef char yes; \ + typedef char (&no)[2]; \ + \ + static typename add_reference::type dummy; \ + \ + struct helpers \ + { \ + template < BOOST_PP_ENUM_PARAMS_Z(1, nargs, class U) > \ + static yes test( \ + qualified_name< BOOST_PP_ENUM_PARAMS_Z(1, nargs, U) >&, int \ + ); \ + \ + template \ + static no test(U&, ...); \ + }; \ + \ + BOOST_STATIC_CONSTANT( \ + bool, value \ + = !is_reference::value \ + & (sizeof(helpers::test(dummy, 0)) == sizeof(yes))); \ + \ + typedef mpl::bool_ type; \ +}; + +# else + +# define BOOST_DETAIL_IS_XXX_DEF(name, qualified_name, nargs) \ +template \ +struct is_##name : mpl::false_ \ +{ \ +}; \ + \ +template < BOOST_PP_ENUM_PARAMS_Z(1, nargs, class T) > \ +struct is_##name< \ + qualified_name< BOOST_PP_ENUM_PARAMS_Z(1, nargs, T) > \ +> \ + : mpl::true_ \ +{ \ +}; + +# endif + +#endif // BOOST_DETAIL_IS_XXX_DWA20051011_HPP