std::experi...d_flag_type(3)
π NAME π
okay so bestie, this page is from the C++ Standard Libary manual β yes, that's literally how the header spells it, we are not fixing it, it's iconic β and the page title is std::experi...d_flag_type(3) (the header shows it twice up top, periodt).
The NAME line is doing a little echo moment: std::experimental::is_simd_flag_type β std::experimental::is_simd_flag_type again. Slay.
π Synopsis
Defined in header <experimental/simd>:
template< class T > (parallelism TS v2)
struct is_simd_flag_type;
So here's the vibe: if T is a valid type for the second argument to copy_from, copy_to, or the corresponding load constructors of simd or simd_mask, then this trait provides the member constant value equal to true. For any other type, value is false. No cap. π
π§© Template parameters
Tβ a type to check π«Ά
π§ Helper variable template
This one is also (parallelism TS v2):
template< class T >
inline constexpr bool is_simd_flag_type_v =
is_simd_flag_type<T>::value;
π Inherited from std::integral_constant
π Member constants
valueβtrueifTis a load/store flag tag type,falseotherwise;[static](public static member constant) β¨
πΈ Member functions
operator boolβ converts the object tobool, returnsvalue(public member function)operator()β returnsvalue;(C++14)(public member function)
π¦ Member types
value_typeβbooltypeβstd::integral_constant<bool, value>
β¨ Example
// Run this code
#include <experimental/simd>
#include <iostream>
int main()
{
namespace stdx = std::experimental;
std::cout << std::boolalpha
<< stdx::is_simd_flag_type_v<stdx::element_aligned_tag>
<< '\n'
<< stdx::is_simd_flag_type_v<int> << '\n';
}
π€ Output:
true
false
π See also
is_abi_tagβ checks if a type is an ABI tag type(parallelism TS v2)(class template)
later bestie π β source: http://cppreference.com, version/date: 2024.06.10, page: std::experi...d_flag_type(3) π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms