[RFC] Two puzzling things in num_put::do_put(void*)
Paolo Carlini
pcarlini@suse.de
Mon Dec 8 09:14:00 GMT 2003
Hi,
the most important one is the presence of a try/catch construct:
__io.flags(__flags & __fmt | (ios_base::hex | ios_base::showbase));
try
{
__s = _M_insert_int(__s, __io, __fill,
reinterpret_cast<unsigned long>(__v));
__io.flags(__flags);
}
catch (...)
{
__io.flags(__flags);
__throw_exception_again;
}
which is not present in num_get::do_get(void*&), or in any other
num_get/num_put virtual for that matter. Indeed, I don't find
support for its presence in the standard...
Less important, I think there is the hidden assumption that
sizeof(void*) == sizeof(unsigned long). This is probably true (on
64 bit platforms too, if I understand well some notes prepared by
Andreas) but I'm not sure if it's something we can really be 100%
confident about.
Paolo.
More information about the Libstdc++
mailing list