Fixes for is_base_and_derived when compiling with /vmg on VC7.1.

[SVN r28387]
This commit is contained in:
John Maddock
2005-04-21 15:58:33 +00:00
parent bfa2c80b6a
commit 55b227c621

View File

@ -110,9 +110,19 @@ google.com and links therein.
template <typename B, typename D>
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 <typename T>
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<typename B, typename D>
@ -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 *();
};