
1 Feb
2006
1 Feb
'06
10:37 a.m.
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