From f100326cf0ef9199b6dde9dda8b59a68616afc29 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Tue, 28 Mar 2006 16:12:56 +0000 Subject: [PATCH] Workarounds for GCC bug http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26904 [SVN r33505] --- include/boost/mpl/aux_/preprocessed/gcc/quote.hpp | 2 +- include/boost/mpl/quote.hpp | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp b/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp index d7d0420..020f093 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp @@ -13,8 +13,8 @@ namespace boost { namespace mpl { template< typename T, bool has_type_ > struct quote_impl - : T { + typedef typename T::type type; }; template< typename T > diff --git a/include/boost/mpl/quote.hpp b/include/boost/mpl/quote.hpp index dab448d..47d62cc 100644 --- a/include/boost/mpl/quote.hpp +++ b/include/boost/mpl/quote.hpp @@ -60,9 +60,19 @@ namespace boost { namespace mpl { template< typename T, bool has_type_ > struct quote_impl +// GCC has a problem with metafunction forwarding when T is a +// specialization of a template called 'type'. +# if BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4)) \ + && BOOST_WORKAROUND(__GNUC_MINOR__, BOOST_TESTED_AT(0)) \ + && BOOST_WORKAROUND(__GNUC_PATCHLEVEL__ BOOST_TESTED_AT(2)) +{ + typedef typename T::type type; +}; +# else : T { }; +# endif template< typename T > struct quote_impl