? 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 <boost/type_traits/detail/yes_no_type.hpp>
@@ -54,6 +55,27 @@
 namespace detail{
 
 template<class T>
+struct is_abstract_imp_aux {
+   template<class U, unsigned N>
+   struct type_wrapper {
+     typedef U type;
+   };
+
+   template<class U>
+   static U* enforce_inst(typename U::SFINAE*);
+   template<class U>
+   static U* enforce_inst(...);
+    
+   typedef typename type_wrapper<T, sizeof(*enforce_inst<T>(0))>::type type;
+};
+
+template<class T>
+struct is_abstract_imp_aux<T&> {
+   typedef typename is_abstract_imp_aux<T>::type type;
+};
+
+
+template<class T>
 struct is_abstract_imp
 {
    // Deduction fails if T is void, function type, 
@@ -65,12 +87,15 @@
    template<class U>
    static type_traits::yes_type check_sig(...);
 
+   typedef typename is_abstract_imp_aux<T>::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<T>::template check_sig<T>(0)));
+   BOOST_STATIC_CONSTANT(unsigned, s1 = 
+      sizeof(is_abstract_imp<T>::template check_sig<check_type>(0)));
 #else
-   BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(check_sig<T>(0)));
+   BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(check_sig<check_type>(0)));
 #endif
     
    BOOST_STATIC_CONSTANT(bool, value = 

