[PATCH] D40259: [libcxx] LWG2993: reference_wrapper<T> conversion from T&&

Eric Fiselier via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 22 11:40:36 PST 2017


EricWF requested changes to this revision.
EricWF added inline comments.
This revision now requires changes to proceed.


================
Comment at: include/__functional_base:396
+        !is_same<__uncvref_t<_Up>, reference_wrapper>::value
+    >::type, bool _IsNothrow = noexcept(__bind(_VSTD::declval<_Up>()))>
+    _LIBCPP_INLINE_VISIBILITY reference_wrapper(_Up&& __u) _NOEXCEPT_(_IsNothrow)
----------------
So I need to backpeddel about using `noexcept` in the SFINAE instead of `decltype`. I forgot that `noexcept` specifications are evaluated "as-needed", and using it in SFINAE could potentially cause the evaluation of "unneeded" noexcept specifications.

Could we go back to `decltype` please?

Sorry about that.


================
Comment at: test/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp:17
+
+// XFAIL: c++98, c++03
+
----------------
This should probably be `// UNSUPPORTED`.


https://reviews.llvm.org/D40259





More information about the cfe-commits mailing list