Boost logo

Boost :

From: Robert Kawulak (kawulak_at_[hidden])
Date: 2006-02-01 05:37:04


> From: Robert Kawulak

> I think this should rather be:
>
> #if BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x846))
> #define BOOST_PRIVATE_BASE_CAST(type, arg)
static_cast<type>(arg)
> #else
> #define BOOST_PRIVATE_BASE_CAST(type, arg) (arg)
> #endif
>
> And later in the appropriate lines:
>
> first_reference first()
> { return BOOST_PRIVATE_BASE_CAST(first_reference, *this); }
> first_const_reference first() const
> { return BOOST_PRIVATE_BASE_CAST(first_const_reference,
*this); }

I think I just found a better solution - if the base classes of
compressed_pair_imp are protected instead of private, then DMC
compiles this fine (and four other compilers I've tested too),
and the code isn't cluttered with macros.

Best regards,
Robert


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk