From 55b227c6217178bbfdd8ce500904c10bca503429 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 21 Apr 2005 15:58:33 +0000 Subject: [PATCH] Fixes for is_base_and_derived when compiling with /vmg on VC7.1. [SVN r28387] --- include/boost/type_traits/is_base_and_derived.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/boost/type_traits/is_base_and_derived.hpp b/include/boost/type_traits/is_base_and_derived.hpp index 7e0ffe5..cf420d8 100644 --- a/include/boost/type_traits/is_base_and_derived.hpp +++ b/include/boost/type_traits/is_base_and_derived.hpp @@ -110,9 +110,19 @@ google.com and links therein. template struct bd_helper { + // + // This VC7.1 specific workaround stops the compiler from generating + // an internal compiler error when compiling with /vmg (thanks to + // Aleksey Gurtovoy for figuring out the workaround). + // +#if !BOOST_WORKAROUND(BOOST_MSVC, == 1310) template static type_traits::yes_type check_sig(D const volatile *, T); static type_traits::no_type check_sig(B const volatile *, int); +#else + static type_traits::yes_type check_sig(D const volatile *, long); + static type_traits::no_type check_sig(B const volatile * const&, int); +#endif }; template @@ -120,7 +130,11 @@ struct is_base_and_derived_impl2 { struct Host { +#if !BOOST_WORKAROUND(BOOST_MSVC, == 1310) operator B const volatile *() const; +#else + operator B const volatile * const&() const; +#endif operator D const volatile *(); };