[libcxx-commits] [PATCH] D130532: [libc++][ranges] Implement `std::ranges::partial_sort_copy`.
Konstantin Varlamov via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jul 29 20:06:22 PDT 2022
var-const 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,
----------------
huixie90 wrote:
> 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>
> ```
Thanks for spotting!
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