[PATCH] D74967: [NFC] Add filters to hasNItems and hasNItemsOrMore
Tyker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 4 09:00:21 PST 2020
Tyker marked an inline comment as done.
Tyker added inline comments.
================
Comment at: llvm/include/llvm/ADT/STLExtras.h:1515
+template <typename IterTy,
+ typename Pred = bool (*)(const decltype(*std::declval<IterTy>()) &)>
bool hasNItems(
----------------
jdoerfert wrote:
> Do we need to provide a default for `Pred` (aka. `PredTy`)? If so, is a function pointer really what we want?
sadly Pred can't be deduced from a default argument, so we need to specify a default template argument as well.
do you see any particular issues or limitation with Pred being a function pointer when no Predicate is provided ?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74967/new/
https://reviews.llvm.org/D74967
More information about the llvm-commits
mailing list