[libcxx-commits] [PATCH] D74351: [libcxx][type_traits] Implement C++20 common_ref

Christopher Di Bella via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 12 11:28:55 PST 2020


cjdb added inline comments.


================
Comment at: libcxx/include/type_traits:2306-2307
+template <class _Tp, class _Up>
+struct __common_reference2<_Tp&, _Up&&, enable_if_t<
+    is_convertible_v<_Up&&, __ll_common_ref<const _Up, _Tp>>>>
+{
----------------
miscco wrote:
> cjdb wrote:
> > Perhaps we should hold off on merging this so we can use `std::convertible_to` instead.
> I would add that `std::convertible_to` has slightly different semantics too as it has some addtional requires clauses
Fair. I'd at least encourage the use of a _requires-clause_, since it's demonstrably faster to compile than SFINAE and is being commit for the first time to a concepts-aware compiler.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74351





More information about the libcxx-commits mailing list