[libcxx-commits] [PATCH] D132327: [libc++] Implement P2445R1 (`std::forward_like`)

Igor Zhukov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Aug 22 10:13:30 PDT 2022


fsb4000 added inline comments.


================
Comment at: libcxx/include/utility:45-60
+template <typename T, typename U>
+using __override_ref_t = std::conditional_t<std::is_rvalue_reference_v<T>,
+                                            std::remove_reference_t<U> &&, U &>;
+template <typename T, typename U>
+using __copy_const_t =
+    std::conditional_t<std::is_const_v<std::remove_reference_t<T>>,
+                       U const, U>;
----------------
fsb4000 wrote:
> philnik wrote:
> > Why do you have (AFAICT non-existent) implementation details in the synopsis? You are also missing a `// since C++23` after `forwrward_like`.
> I copied from https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2445r1.pdf
> 
> Yes, I will add `// since C++23` and I look at the standard.
C++ standard has the same implementation details.
https://eel.is/c++draft/forward#lib:forward_like


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

https://reviews.llvm.org/D132327



More information about the libcxx-commits mailing list