
"Robert Kawulak" <tigrisek@interia.pl> writes:
Hi,
Recently I've discovered that Digital Mars compiler (version 8.42n) has problems when compiling boost::compressed_pair. The problem is in the member functions first() and second() in cases when compressed_pair is derived from either first or second type. To fix the problem, *this must be explicitly converted to the return type, so the functions would look like this:
second_reference second() { return static_cast<second_reference>(*this); }
Should be boost::implicit_cast<second_reference>(*this);
instead of the way they're implemented now:
second_reference second() { return *this; }
If the problem wasn't mentioned before, then I'd suggest to fix it. The solution is quite easy to introduce and AFAICT has no negative side effects. Does anybody object to this?
I don't object, but the obfuscation of the code is a negative side effect. -- Dave Abrahams Boost Consulting www.boost-consulting.com