From dc50912e649bd2f0098d7dea4fa83ff7071815a5 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Mon, 5 Jan 2004 14:36:18 +0000 Subject: [PATCH] Workarounds for gcc-3.2 [SVN r21499] --- include/boost/mpl/aux_/has_xxx.hpp | 45 ++++++++++++++++-------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/include/boost/mpl/aux_/has_xxx.hpp b/include/boost/mpl/aux_/has_xxx.hpp index 00131ec..e6609d2 100644 --- a/include/boost/mpl/aux_/has_xxx.hpp +++ b/include/boost/mpl/aux_/has_xxx.hpp @@ -32,27 +32,30 @@ // Rani Sharoni (comp.lang.c++.moderated, 2002-03-17 07:45:09 PST) # define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \ -template< typename T > \ -struct trait \ -{ \ - template< typename U > \ - static boost::mpl::aux::yes_tag \ - helper( \ - boost::mpl::aux::type_wrapper const volatile* \ - , boost::mpl::aux::type_wrapper* = 0 \ - ); \ - \ - static boost::mpl::aux::no_tag \ - helper(...); \ - \ - typedef boost::mpl::aux::type_wrapper t_; \ - \ - BOOST_STATIC_CONSTANT( \ - bool, value = \ - sizeof(trait::helper(static_cast(0))) \ - == sizeof(boost::mpl::aux::yes_tag) \ - ); \ -}; \ +template< typename T > \ +struct trait \ +{ \ + struct helpers \ + { \ + template< typename U > \ + static boost::mpl::aux::yes_tag \ + test( \ + boost::mpl::aux::type_wrapper const volatile* \ + , boost::mpl::aux::type_wrapper* = 0 \ + ); \ + \ + static boost::mpl::aux::no_tag \ + test(...); \ + }; \ + \ + typedef boost::mpl::aux::type_wrapper t_; \ + \ + BOOST_STATIC_CONSTANT( \ + bool, value = \ + sizeof(helpers::test(static_cast(0))) \ + == sizeof(boost::mpl::aux::yes_tag) \ + ); \ +}; \ /**/ # else