[libcxx-commits] [PATCH] D91292: [libc++] [P0935] [C++20] Eradicating unnecessarily explicit default constructors from the standard library.

Marek Kurdej via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 11 12:25:32 PST 2020


curdeius created this revision.
curdeius added a reviewer: ldionne.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
curdeius requested review of this revision.

First step only with linear_congruential_engine. I'll do the rest later after having some feedback on this one.
I'd like to know your opinion on the way I test non-explicit ctors, as well as the modifications in the headers (comments, ifdefs for pre-C++20/C++20, etc.).
That's a bit of a hassle to duplicate all this pre-C++20 and C++20-onwards stuff, but I guess we don't want to modify pre-C++20 behaviour.

Another thing, I've seen that queue and stack already have non-explicit ctors and not defaulted parameters.
And this non-explicity is not tested (not in libcxx\test\std\containers\container.adaptors\stack\stack.cons\ctor_default.pass.cpp at least).
I'll add tests later of course.

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0935r0.html


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D91292

Files:
  libcxx/include/random
  libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/ctor_result_type.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91292.304621.patch
Type: text/x-patch
Size: 10017 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201111/a0118b21/attachment.bin>


More information about the libcxx-commits mailing list