std::experi...tion_policy(3)

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

πŸ’– NAME πŸ’–

okay bestie, this is std::experi...tion_policy(3) from the C++ Standard Libary manual (yes, that spelling is in the header, no cap 😭), and the NAME line is literally std::experimental::parallel::is_execution_policy - std::experimental::parallel::is_execution_policy. She said it twice because she contains multitudes. πŸ’…

✨ Synopsis ✨

Defined in header <experimental/execution_policy>:

template< class T >                                (parallelism TS)
struct is_execution_policy;

This icon checks whether T is a standard or implementation-defined execution policy type. πŸ¦‹

She provides the member constant value, which is equal to true if T is execution_policy, sequential_execution_policy, parallel_execution_policy, parallel_vector_execution_policy, or an implementation-defined execution policy type. Otherwise, value is equal to false. Periodt.

Warning bestie: the behavior of a program that adds specializations for is_execution_policy is undefined. Like, do not do it. Not cute, not slay, not the vibe. πŸ’€

🌸 Template parameters 🌸

  • T β€” a type to check. That’s the whole vibe check. 🫢

πŸŽ€ Helper template πŸŽ€

Defined in header <experimental/execution_policy>:

template< class T >
constexpr bool is_execution_policy_v =
(parallelism TS)
is_execution_policy<T>::value;

That’s the (parallelism TS) helper template, lowkey iconic. ✨

πŸ’œ Inherited from std::integral_constant πŸ’œ

πŸ“ Member constants πŸ“

  • value β€” true if T is a standard or implementation-defined execution policy type, false otherwise. It’s [static], and it’s a public static member constant. So yes, main character energy. πŸ‘‘

πŸ”₯ Member functions πŸ”₯

  • operator bool β€” converts the object to bool, returns value. Public member function. Slay. πŸ’…
  • operator() β€” returns value. Marked (C++14). Public member function. The way she calls herself? Obsessed. 😭

🌈 Member types 🌈

  • value_type β€” bool
  • type β€” std::integral_constant<bool, value>

okay bestie, that’s the whole page πŸ’– this came from http://cppreference.com, dated 2024.06.10, and the footer still calls it std::experi...tion_policy(3) β€” cute little sign-off, fr fr. go check your execution policy vibes now. πŸ§šβ€β™€οΈπŸŒ±βœ¨

πŸ“¦ where this page comes from