std::indire...ry_predicate(3)
π NAME π
okay so bestie, we are in the C++ Standard Libary manual (yes, spelled like that in the header β we keep the lore) and this is the page for std::indirect_unary_predicate. The NAME line is literally std::indirect_unary_predicate - std::indirect_unary_predicate β yes, it said it twice, and honestly? iconic. π
β¨
πΈ Synopsis πΈ
Defined in header <iterator> π¦
template< class F, class I >
concept indirect_unary_predicate =
std::indirectly_readable<I> &&
std::copy_constructible<F> && (since
C++20)
std::predicate<F&, std::iter_value_t<I>&> &&
std::predicate<F&, std::iter_reference_t<I>> &&
std::predicate<F&, std::iter_common_reference_t<I>>;
This one is since C++20, and it's giving βrequirements eraβ in the best way. π
So indirect_unary_predicate specifies requirements for algorithms that call unary predicates as their arguments. That's its whole job. β¨
The key difference between this concept and std::predicate is that it is applied to the type that I references, rather than I itself. Lowkey the entire plot twist. π
π§ Semantic requirements π§
F and I model indirect_unary_predicate only if all concepts it subsumes are modeled. That's it, that's the semantic vibe check β no skipping the subsumed concepts, bestie. π«Ά
cute sign-off: source http://cppreference.com, version/date 2024.06.10, page tag std::indire...ry_predicate(3). ty for reading, mwah ππ
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms