[libcxx-commits] [PATCH] D92725: [libc++] [LWG2993] reference_wrapper<T> conversion from U&&

Marek Kurdej via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Dec 10 14:38:38 PST 2020


curdeius added a comment.

Just to understand, how is your approach simpler than the one in D40259 <https://reviews.llvm.org/D40259>?



================
Comment at: libcxx/include/__functional_base:396
+    _LIBCPP_INLINE_VISIBILITY reference_wrapper(_Up&& __u) _NOEXCEPT_(noexcept(__fun(_VSTD::declval<_Up>()))) {
+        type& __f = static_cast<_Up&&>(__u);
+        __f_ = _VSTD::addressof(__f);
----------------
Is there a difference between your approach, i.e. putting this in the ctor's body, and putting it into the initializer list?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92725/new/

https://reviews.llvm.org/D92725



More information about the libcxx-commits mailing list