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 *(); };