std::experi...::Predicate(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’– NAME πŸ’–

std::experi...::Predicate - std::experimental::ranges::Predicate β€” bestie, it’s giving β€œname so nice they ran it twice” ✨ This page is std::experi...::Predicate(3), straight from the C++ Standard Libary manual. No cap.

✨ Synopsis ✨

Okay so here’s the synopsis, copied with love and exactness:

          Defined in header <experimental/ranges/concepts>
          template< class F, class... Args >

          concept bool Predicate =                          (ranges TS)
              RegularInvocable<F, Args...> &&

              Boolean<std::result_of_t<F&&(Args&&...)>>;

The concept Predicate<F, Args...> is the vibe check that says: F is a predicate that accepts arguments whose types and value categories are encoded by Args..., i.e., it can be invoked with these arguments to produce a Boolean result. πŸ”₯

Note that RegularInvocable requires the invocation to not modify either the callable object or the arguments, and to be equality-preserving. Periodt.

🌸 Equality preservation 🌸

An expression is equality preserving if it results in equal outputs given equal inputs. Ngl, that’s the whole mood.

  • The inputs to an expression consist of its operands.
  • The outputs of an expression consist of its result and all operands modified by the expression (if any).

Every expression required to be equality preserving is further required to be stable: two evaluations of such an expression with the same input objects must have equal outputs absent any explicit intervening modification of those input objects. Literally the consistency icon πŸ‘‘


That’s the whole page, bestie πŸ’– Source: http://cppreference.com Β· date: 2024.06.10 Β· footer title: std::experi...::Predicate(3). Mwah πŸ’‹

πŸ“¦ where this page comes from