On Sun, 16 Feb 2003 12:45:30 +0100, John Maddock wrote: >> typedef char t9[ !test::is_class< int( int ) >::value ]; > > Generates warnings on gcc only, these have been reported and confirmed > as a gcc bug: > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p > r=8503 > >> typedef char t10[ !test::is_enum< int( int ) >::value ]; > > again that's a gcc 3.2 bug.
Here's a patch which should fix the problems and shouldn't hurt any other compiler as is_function can always be used in this context AFAICS. Regards, Daniel --- is_enum.hpp Sun Feb 16 22:38:13 2003 +++ is_enum.hpp.patch Sun Feb 16 22:35:54 2003 @@ -15,6 +15,7 @@ #include "boost/type_traits/is_arithmetic.hpp" #include "boost/type_traits/is_reference.hpp" #include "boost/type_traits/is_convertible.hpp" +#include "boost/type_traits/is_function.hpp" #include "boost/type_traits/config.hpp" #ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION @@ -65,6 +66,7 @@ (::boost::type_traits::ice_or< ::boost::is_arithmetic<T>::value , ::boost::is_reference<T>::value + , ::boost::is_function<T>::value // We MUST do this on conforming compilers in order to // correctly deduce that noncopyable types are not enums (dwa // 2002/04/15)... @@ -75,6 +77,7 @@ (::boost::type_traits::ice_or< ::boost::is_arithmetic<T>::value , ::boost::is_reference<T>::value + , ::boost::is_function<T>::value // However, not doing this on non-conforming compilers prevents // a dependency recursion. >::value)); _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost