std::experi...al::negation(3)

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

πŸ’– NAME πŸ’–

std::experimental::negation β€” std::experimental::negation (the page title up top is std::experi...al::negation(3), and the manual name is C++ Standard Libary, so hi bestie πŸ’…).

✨ Synopsis ✨

Defined in header <experimental/type_traits>
template< class B >                          (1) (library
fundamentals TS v2)
struct negation;

Forms the logical negation of the type trait B.

The type negation<B> is a UnaryTypeTrait with a base characteristic of std::integral_constant<bool, !bool(B::value)>.

πŸŽ€ Template parameters πŸŽ€

  • B β€” any type such that the expression bool(B::value) is a valid constant expression.

πŸ¦‹ Helper variable template πŸ¦‹

template< class B >                              (library
fundamentals TS v2)
constexpr bool negation_v = negation<B>::value;

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

🌸 Member constants 🌸

  • value β€” true if B has a member ::value such that !bool(B::value) is true, false otherwise. [static] (public static member constant).

🌈 Member functions 🌈

  • operator bool β€” converts the object to bool, returns value (public member function).
  • operator() β€” returns value (C++14) (public member function).

πŸ“ Member types πŸ“

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

πŸ”₯ Possible implementation πŸ”₯

template<class B>
struct negation : std::integral_constant<bool, !bool(B::value)> {};

😭 Example 😭

This section is incomplete

Reason: no example

πŸ‘‘ See also πŸ‘‘

  • negation β€” logical NOT metafunction (C++17) (class template).

🧚 Category 🧚

  • Todo no example

mwah πŸ’‹ source/version: http://cppreference.com, date: 2024.06.10 β€” and that's the whole vibe for std::experi...al::negation(3) 🫢

πŸ“¦ where this page comes from