? is_abstract.hpp.cl Index: is_abstract.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/type_traits/is_abstract.hpp,v retrieving revision 1.4 diff -u -u -r1.4 is_abstract.hpp --- is_abstract.hpp 22 May 2004 10:36:05 -0000 1.4 +++ is_abstract.hpp 11 Nov 2004 19:29:25 -0000 @@ -41,6 +41,7 @@ // (starting with submission #10). // - Jan 2004: GCC 3.4 fixed to suport DR337 (Giovanni Bajo). // - Jan 2004: modified to be part of Boost.TypeTraits (Pavel Vozenilek). +// - Nov 2004: workaround for GCC bug #17232 (Christoph Ludwig) // #include @@ -54,6 +55,27 @@ namespace detail{ template +struct is_abstract_imp_aux { + template + struct type_wrapper { + typedef U type; + }; + + template + static U* enforce_inst(typename U::SFINAE*); + template + static U* enforce_inst(...); + + typedef typename type_wrapper(0))>::type type; +}; + +template +struct is_abstract_imp_aux { + typedef typename is_abstract_imp_aux::type type; +}; + + +template struct is_abstract_imp { // Deduction fails if T is void, function type, @@ -65,12 +87,15 @@ template static type_traits::yes_type check_sig(...); + typedef typename is_abstract_imp_aux::type check_type; + // GCC2 won't even parse this template if we embed the computation // of s1 in the computation of value. #ifdef __GNUC__ - BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(is_abstract_imp::template check_sig(0))); + BOOST_STATIC_CONSTANT(unsigned, s1 = + sizeof(is_abstract_imp::template check_sig(0))); #else - BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(check_sig(0))); + BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(check_sig(0))); #endif BOOST_STATIC_CONSTANT(bool, value =