[libcxx-commits] [PATCH] D117953: [libc++] Fix LWG3146 "Excessive unwrapping in std::ref/cref"
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jan 23 04:28:55 PST 2022
Mordante accepted this revision as: Mordante.
Mordante added a comment.
LGTM!
================
Comment at: libcxx/include/__functional/reference_wrapper.h:213
{
- return _VSTD::cref(__t.get());
+ // C++20 says "return __t", but C++03 lacks the relevant
+ // converting constructor. This should be equivalent.
----------------
That makes it clear it's supposed to work like this in all Standard modes and it's not a C++20 change.
Obviously this is kind of moot due to D117974.
================
Comment at: libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/cref_2.pass.cpp:25
-int main(int, char**)
+TEST_CONSTEXPR_CXX20 bool test()
{
----------------
Nice to see these `constexpr` tests!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117953/new/
https://reviews.llvm.org/D117953
More information about the libcxx-commits
mailing list