Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::is_execution_policy

      From cppreference.com
      <cpp‎ |algorithm
       
       
      Algorithm library
      Constrained algorithms and algorithms on ranges(C++20)
      Constrained algorithms, e.g.ranges::copy,ranges::sort, ...
      Execution policies(C++17)
      is_execution_policy
      (C++17)  
      Sorting and related operations
      Partitioning operations
      Sorting operations
      Binary search operations
      (on partitioned ranges)
      Set operations (on sorted ranges)
      Merge operations (on sorted ranges)
      Heap operations
      Minimum/maximum operations
      (C++11)
      (C++17)
      Lexicographical comparison operations
      Permutation operations
      C library
      Numeric operations
      Operations on uninitialized memory
       
      Defined in header<execution>
      template<class T>
      struct is_execution_policy;
      (since C++17)

      Checks whetherT is a standard or implementation-defined execution policy type.

      Provides the member constantvalue which is equal totrue, ifT isa standard execution policy type, or an implementation-defined execution policy type. Otherwise,value is equal tofalse.

      If the program adds specializations forstd::is_execution_policy orstd::is_execution_policy_v, the behavior is undefined.

      Contents

      [edit]Template parameters

      T - a type to check

      [edit]Helper template

      Defined in header<execution>
      template<class T>
      constexprbool is_execution_policy_v= std::is_execution_policy<T>::value;
      (since C++17)
      [edit]

      Inherited fromstd::integral_constant

      Member constants

      value
      [static]
      true ifT is a standard or implementation-defined execution policy type,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>
      Run this code
      #include <execution> static_assert(std::is_execution_policy_v<std::execution::unsequenced_policy>);static_assert(!std::is_execution_policy_v<int>); int main(){}

      [edit]See also

      execution policy types
      (class)[edit]
      (C++17)(C++17)(C++17)(C++20)
      global execution policy objects
      (constant)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/algorithm/is_execution_policy&oldid=176445"

      [8]ページ先頭

      ©2009-2025 Movatter.jp