Details
- Reviewers
ldionne - Group Reviewers
Restricted Project - Commits
- rG737a4501e815: Add constexpr to pair
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I somehow missed to add the description to the PR so here it is:
This implements the changes to utility as described by the misc_constexpr paper.
While there I tried to overhaul the tests to get rid of the local classes that should be able to be replaced by the archetypes
Took the opportunity to look through this again. Mostly nits about the tests
libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair.pass.cpp | ||
---|---|---|
39 | I believe I have to check this one here, It seems moving to ConstexprTestTypes::MoveOnly should suffice | |
libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp | ||
43 | I am really not too happy with this dance. I guess one should add one additional section for C++20 only | |
libcxx/test/std/utilities/utility/pairs/pairs.pair/swap.pass.cpp | ||
24 ↗ | (On Diff #266217) | Could we remove those by the way? I do not see any use for them |
Mostly LGTM with nits.
libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair.pass.cpp | ||
---|---|---|
27 | This isn't used. | |
libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp | ||
43 | I think this is acceptable, we do it in a bunch of other places for testing constexpr. I do agree that something in the test runner would be better, but eh. | |
libcxx/test/std/utilities/utility/pairs/pairs.pair/swap.pass.cpp | ||
24 ↗ | (On Diff #266217) | Do you mean remove S altogether? It's used below. |
libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair.pass.cpp | ||
---|---|---|
27 | True, will remove | |
libcxx/test/std/utilities/utility/pairs/pairs.pair/swap.pass.cpp | ||
24 ↗ | (On Diff #266217) | I think that was from a previous revision where I did not yet removed those two lines S * operator& () { assert(false); return this; } S const * operator& () const { assert(false); return this; } |
This isn't used.