std::predicate(3cxx)

πŸ“¦
version 16-20260322 Β· 3 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– std::predicate β€” the manual page, but make it a group chat πŸ’–

okay so bestie, you opened std::predicate(3cxx) from the libstdc++ fam and honestly? iconic choice. this is the <concepts> girlie that tells you whether some callable is giving "yes/no energy" β€” a predicate, periodt. πŸŽ€


✨ NAME ✨

std::predicate β€” from [concept.predicate], the concept known as concept predicate. that's it, that's the name, we're keeping it cute and literal. πŸ’…


🌸 SYNOPSIS 🌸

first things first, you gotta bring her in:

#include <concepts>

πŸ¦‹ Concept definition πŸ¦‹

here's the whole vibe, verbatim, no cap:

template<typename _Fn, typename... _Args>
concept std::predicate =  regular_invocable<_Fn, _Args...>
      && __detail::__boolean_testable<invoke_result_t<_Fn, _Args...>>

so like β€” _Fn has to be regular_invocable with those _Args..., and the thing it hands back (invoke_result_t<_Fn, _Args...>) has to pass the __detail::__boolean_testable check. both. not one or the other. both. πŸ’–


πŸ‘‘ DETAILED DESCRIPTION πŸ‘‘

[concept.predicate], concept predicate. literally the whole thing β€” that's the description, we're not gonna pad it out, she said what she said. ✨


🌈 AUTHOR 🌈

Generated automatically by Doxygen for libstdc++ from the source code. πŸ€–πŸ’œ


and that's a wrap on std::predicate(3cxx), bestie β€” shoutout to libstdc++ for the source, Doxygen for the auto-generation, and you for actually reading a concepts page for fun. slay, go predicate something. πŸ’…βœ¨πŸ¦‹