From: Fernando Cacciola (fernando_cacciola_at_[hidden])
Date: 2005-06-23 18:35:29
David Abrahams wrote:
> "Fernando Cacciola" <fernando_cacciola_at_[hidden]> writes:
>> David Abrahams wrote:
>>> Markus Schöpflin <markus.schoepflin_at_[hidden]> writes:
>>> I'm guessing that in strict ansi mode there's no specialization of
>>> numeric_limits<unsigned long long>. But the real problem here is
>>> that Fernando Cacciola is supposed to fix a looming ODR violation
>>> and replace the old numeric_cast with one that's already written
>>> and in Boost.
>>> Whassup, Fernando?
>> Yea, I'm sorry, since the arrival of the new family menmber (our
>> son) I'm trying to pull back toghether my work life.
Thank you :-)
>> I'm finishing the fix right now.
> Thank you very much! Do we need to update the docs for numeric_cast
> or redirect them somehow?
OK, I commited the fixes.
Here's a list of the changes:
Removed the numeric_cast<> code from boost/cast.hpp and added
an #include <boost/numeric/conversion/cast.hpp> in its place
This change unfortunately means that users of boost/cast.hpp,
even for the other casts, are going to get most of the
numeric conversion library in; but I don't see any
way to automatically "replace" the old numeric_cast<>.
Extracted the old numeric_cast<> code into a new file in the
numeric conversion library folders.
Added a BOOST_WORKAROUND switch into the new
to redirect the implementation to the old code
for those old compilers that can't deal with the
Fixed the documentation (on all affected places)
Removed the numeric_cast_test.cpp from the
Temporarily removed all the failure marks on the
I need this to determine clearly which compilers
need the redirection to the old code and why
(the fix could be trivial)
After a run of regressions, I'll look at the reports,
adjust the redirection macros and put back the
failure marks accordingly.
My new numeric_cast<> used as an exception class:
while the old code used
Now that the old code is superseeded by the new one,
I adopted bad_numeric_cast, which means that
if there is any user of the new code relying on it,
that code will stop compiling.
I have placed a note in the updated documentation,
but I suppose I ought to add the note to some
release notes as well.
Where should I add that? The main index.html?
(B) I happen to have bcc5.5.1, which is not on the
regressions list but I tested my code with it.
It works except for one thing: borland complains
about both a template function and a class
This is a problem introduced by "boost/mpl/numeric_cast.hpp"
which contains a workaround to solve it,
but that workaround was not contemplating
BCC as a candidate, so I added
Notice that I tested against the last known BCC
version and not just the one I have.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk