[libcxx-commits] [PATCH] D130532: [libc++][ranges] Implement `std::ranges::partial_sort_copy`.

Hui via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jul 28 04:04:35 PDT 2022


huixie90 added inline comments.


================
Comment at: libcxx/include/__algorithm/make_projected.h:81-84
+template <class _Pred, class _Proj, class = __enable_if_t<__can_use_pristine_comp<_Pred, _Proj>::value> >
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static
+__enable_if_t<
+    __can_use_pristine_comp<_Pred, _Proj>::value,
----------------
why is the `enable_if` logic written twice?
Also, usually for sfinae multiple overloads, we use non-type template parameter
```
template <class A, enable_if<C>* = nullptr>
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130532



More information about the libcxx-commits mailing list