[v3] libstdc++/30127/34449

Jonathan Wakely jwakely.gcc@gmail.com
Sun Dec 16 12:07:00 GMT 2007


On 14/12/2007, Benjamin Kosnik <bkoz@redhat.com> wrote:
> Fixes for use_facet/has_facet: now facet hierarchy is checked, to make
> sure that use of derived-facet methods properly error when the locale
> only has the base facet.

Unless I'm missing something, these changes will affect performance
more than necessary.

In has_facet, the dynamic_cast to a pointer type cannot throw so is
the try-catch needed?

In use_facet, if the first dynamic_cast works, the second will too, so
there's no point doing it twice.

Something like this still pass the new tests.

Jon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: locale.patch
Type: text/x-patch
Size: 1110 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20071216/7dccce4d/attachment.bin>


More information about the Libstdc++ mailing list