This completes libc++'s implementation of P0879 "Constexpr for swap and swap related functions."
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0879r0.html
For the feature-macro adjustment, see
https://cplusplus.github.io/LWG/issue3256
Differential D93661
[libc++] [P0879] constexpr std::sort, and add new tests for it • Quuxplusone on Dec 21 2020, 12:54 PM. Authored by
Details
This completes libc++'s implementation of P0879 "Constexpr for swap and swap related functions." For the feature-macro adjustment, see
Diff Detail
Event Timeline
Comment Actions What's the status of this? Can you please rebase so CI runs (there were some CI issues during the holidays, I remember patch application failing). Ping me when this is ready for review, until then I'm marking as "changes requested".
Comment Actions Rebase on main (after landing D94807) At least on OSX, this patch has no effect on the output of nm libc++.dylib or ls -l libc++.dylib. The effect on libc++.a is that it shrinks from 7968'560 to 7968'408 bytes; the diff in nm libc++.a | sort is this, which I don't see why this should happen at all, but anyway it's not a bad thing: 000000000001bfc0 T __ZNSt3__16locale5__impC2ERKS1_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi 000000000001c6c0 T __ZNSt3__16locale5__impC1ERKS1_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi 000000000001c6d0 T __ZNSt3__16locale5__impC2ERKS1_S3_i -000000000001d188 b __ZZNSt3__117iostream_categoryEvE1s -000000000001d190 b __ZGVZNSt3__117iostream_categoryEvE1s -000000000001d198 b __ZZNSt3__18ios_base5iwordEiE5error -000000000001d1a0 b __ZZNSt3__18ios_base5pwordEiE5error -000000000001d1a8 S __ZNSt3__18ios_base9__xindex_E +000000000001d180 b __ZZNSt3__117iostream_categoryEvE1s +000000000001d188 b __ZGVZNSt3__117iostream_categoryEvE1s +000000000001d190 b __ZZNSt3__18ios_base5iwordEiE5error +000000000001d198 b __ZZNSt3__18ios_base5pwordEiE5error +000000000001d1a0 S __ZNSt3__18ios_base9__xindex_E 000000000001d4e8 b __ZZNSt3__115future_categoryEvE3__f 000000000001d4f0 b __ZGVZNSt3__115future_categoryEvE3__f 000000000001e430 T __ZNSt3__16locale5__impC1ERKS1_S3_i 000000000001e440 T __ZNSt3__16locale5__impC2ERKS1_PNS0_5facetEl
|
This comment was never correct. _Compare may be Pred&, or it may be __debug_less<Pred> without the &.