From 5359f483bce6e4bc682daf1c4e56912a9517506c Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Tue, 13 Jan 2004 19:04:15 +0000 Subject: [PATCH] Workaround for GCC2 [SVN r21695] --- include/boost/type_traits/is_abstract.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/boost/type_traits/is_abstract.hpp b/include/boost/type_traits/is_abstract.hpp index ad0642c..b26d107 100755 --- a/include/boost/type_traits/is_abstract.hpp +++ b/include/boost/type_traits/is_abstract.hpp @@ -65,10 +65,14 @@ struct is_abstract_imp template static type_traits::yes_type check(...); + // GCC2 won't even parse this template if we embed the computation + // of s1 in the computation of value. + BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(check(0))); + BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< ::boost::is_class::value, - (sizeof(check(0)) == sizeof(type_traits::yes_type)) + (s1 == sizeof(type_traits::yes_type)) >::value)); };