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