Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::nontype,std::nontype_t

      From cppreference.com
      <cpp‎ |utility
       
       
      Utilities library
       
      Function objects
      Function invocation
      (C++17)(C++23)
      Identity function object
      (C++20)
      Old binders and adaptors
      (until C++17*)
      (until C++17*)
      (until C++17*)
      (until C++17*)  
      (until C++17*)
      (until C++17*)(until C++17*)(until C++17*)(until C++17*)
      (until C++20*)
      (until C++20*)
      (until C++17*)(until C++17*)
      (until C++17*)(until C++17*)

      (until C++17*)
      (until C++17*)(until C++17*)(until C++17*)(until C++17*)
      (until C++20*)
      (until C++20*)
       
      Defined in header<utility>
      template<auto V>
      struct nontype_t{explicit nontype_t()=default;};
      (1)(since C++26)
      template<auto V>
      constexpr std::nontype_t<V> nontype{};
      (2)(since C++26)
      1) The class templatestd::nontype_t can be used in the constructor's parameter list to match the intended tag.
      2) The correspondingstd::nontype instance of(1) is a disambiguation argument tag that can be passed to the constructors ofstd::function_ref to indicate that the contained object should be constructed with the value of the constant template parameterV.

      [edit]Template parameters

      V - constant template parameter of astructural type.

      [edit]See also

      non-owning wrapper of any callable object
      (class template)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/utility/nontype&oldid=182733"

      [8]ページ先頭

      ©2009-2025 Movatter.jp