[v3 patch] Implement N4258: Cleaning-up noexcept in the library
Jonathan Wakely
jwakely@redhat.com
Fri Jun 26 20:42:00 GMT 2015
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4258.pdf
This implements N4258 except for the basic_string parts, which I'm
still working on (because I forgot to do allocator propagation
properly in the new string).
Since the new is_always_equal trait is inspired by the
_S_always_equal() member of our __alloc_traits the changes are not
very large, because we are already doing the right thing in the
containers.
I couldn't see a way to add is_always_equal only for C++17 without
introducing ODR violations. I tried adding an __is_always_equal trait
for internal use in C++11-and-later modes, and only define
is_always_equal for C++17, but in order to do the right thing it has
to check for A::is_always_equal in user-defined allocators, so that
already breaks if users #define is_always_equal as a macro. So I
decided to just go ahead and define is_always_equal even in C++11, on
the basis that it fixes LWG DR 2108 and it's better to have the trait
give the same result in C++11 and C++17 modes.
Tested powerpc64le-linux, committed to trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 37003 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20150626/349efe4c/attachment.bin>
More information about the Libstdc++
mailing list