|
Boost : |
From: Robert Kawulak (tigrisek_at_[hidden])
Date: 2006-01-23 16:27:40
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); }
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?
The changes have to be done in the following lines: 158, 159,
203, 204, 244, 245, 247, 248, 280, 281 of
boost/detail/compressed_pair.hpp file. Also, the comment in line
256 is out-of-date after changes made by John Maddock in 25 Jan
2004:
// Note does not actually store an instance of T2 at all
-
// but reuses T1 base class for both first() and
second().
This could be removed as well.
Best regards,
Robert
----------------------------------------------------------------------
Kliknij po wiecej! >>> http://link.interia.pl/f18ed
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk