[C++-sig] Problem with identifying polymorphic types on Mac OS
David Abrahams
dave at boost-consulting.com
Thu Dec 15 05:22:52 CET 2005
"J. Michael Owen" <mikeowen at llnl.gov> writes:
> Hi Ralf,
>
> Sadly the type I'm exposing is the std::pair, so I can't just modify
> its source in this way. I'm going to have to work around this problem
> by altering my code to not use std::pair<double, string>. It turns
> out that std::pair<string, double> works without a problem. ??
>
> I notice your compiler guards only screen out Apple's gcc 3.3 version
> -- does that mean that the newer gcc you can get with OS X 10.4 does
> not have this issue?
namespace boost
{
template <class T, class U>
struct is_polymorphic<std::pair<T,U> >
: mpl::false_
{};
}
Is probably the cleanest workaround.
HTH,
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the Cplusplus-sig
mailing list