From 8fa22b802401ef89404e78a9e9bdff810e9e697c Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sat, 4 Dec 2004 13:38:57 +0000 Subject: [PATCH] Modified to use BOOST_NO_IS_ABSTRACT [SVN r26427] --- include/boost/type_traits/is_abstract.hpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/include/boost/type_traits/is_abstract.hpp b/include/boost/type_traits/is_abstract.hpp index 5f6e38f..49c67e4 100755 --- a/include/boost/type_traits/is_abstract.hpp +++ b/include/boost/type_traits/is_abstract.hpp @@ -44,12 +44,17 @@ // - Nov 2004: Christoph Ludwig found that the implementation did not work with // template types and gcc-3.4 or VC7.1, fix due to Christoph Ludwig // and John Maddock. +// - Dec 2004: Added new config macro BOOST_NO_IS_ABSTRACT which causes the template +// to degrade gracefully, rather than trash the compiler (John Maddock). // #include #include #include #include "boost/type_traits/detail/ice_and.hpp" +#ifdef BOOST_NO_IS_ABSTRACT +#include +#endif // should be the last #include #include "boost/type_traits/detail/bool_trait_def.hpp" @@ -57,6 +62,7 @@ namespace boost { namespace detail{ +#ifndef BOOST_NO_IS_ABSTRACT template struct is_abstract_imp { @@ -88,10 +94,14 @@ struct is_abstract_imp (s1 == sizeof(type_traits::yes_type)) >::value)); }; - +#endif } +#ifndef BOOST_NO_IS_ABSTRACT BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_abstract,T,::boost::detail::is_abstract_imp::value) +#else +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_abstract,T,::boost::detail::is_polymorphic_imp::value) +#endif } // namespace boost