Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::experimental::negation

      From cppreference.com
      <cpp‎ |experimental
       
       
       
       
      Merged into ISO C++ The functionality described on this page was merged into the mainline ISO C++ standard as of 2/2016, seestd::negation(since C++17)
      template<class B>
      struct negation;
      (1)(library fundamentals TS v2)

      Forms the logical negation of the type traitB.

      The typenegation<B> is aUnaryTypeTrait with a base characteristic ofstd::integral_constant<bool,!bool(B::value)>.

      Contents

      [edit]Template parameters

      B - any type such that the expressionbool(B::value) is a valid constant expression

      [edit]Helper variable template

      template<class B>
      constexprbool negation_v= negation<B>::value;
      (library fundamentals TS v2)
      [edit]

      Inherited fromstd::integral_constant

      Member constants

      value
      [static]
      true ifB has a member::value such that!bool(B::value) istrue,false otherwise
      (public static member constant)

      Member functions

      operator bool
      converts the object tobool, returnsvalue
      (public member function)
      operator()
      (C++14)
      returnsvalue
      (public member function)

      Member types

      Type Definition
      value_typebool
      typestd::integral_constant<bool, value>

      [edit]Possible implementation

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

      [edit]Example

      This section is incomplete
      Reason: no example

      [edit]See also

      (C++17)
      logical NOT metafunction
      (class template)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/experimental/negation&oldid=155004"

      [8]ページ先頭

      ©2009-2026 Movatter.jp