std::is_bounded_array 是一元类型特征 (UnaryTypeTrait) 。 检查T 是否为边界已知的数组类型。如果 T 是边界已知的数组类型,那么提供的成员常量 value 等于true。否则,value 等于false。 如果程序添加了 std::is_bounded_array 或std::is_bounded_array_v 的特化,那么行为未定义。
std::is_aggregate std::has_unique_object_representations std::endian std::remove_cvref std::type_index C 数值极限接口 定宽整数类型 (C++11 起) std::is_bounded_array std::is_unbounded_array std::size_t std::nullptr_t std::is_integral std::rank std::is_void std::is_null_pointer std...
std::cout << std::is_array<int[3]>::value << '\n'; } Output: false true true false false true true See also is_bounded_array checks if a type is an array type of known bound (class template) (C++20) is_unbounded_array checks if a type is an array type of unknown bound ...
is_bounded_array (C++20) checks if a type is an array type of known bound (class template) is_unbounded_array (C++20) checks if a type is an array type of unknown bound (class template) rank (C++11) obtains the number of dimensions of an array type ...
添加is_array 或is_array_v (C++17 起) 的特化的程序行为未定义。 模板形参T - 要检查的类型 辅助变量模板template< class T > inline constexpr bool is_array_v = is_array<T>::value; (C++17 起) 继承自 std::integral_constant 成员常量 value [静态] 若T 为数组类型则为 true ,否则为 false...
is_bounded_array (C++20) 检查类型是否为有已知边界的数组类型 (类模板) is_unbounded_array (C++20) 检查类型是否为有未知边界的数组类型 (类模板) rank (C++11) 获取数组类型的维数 (类模板) extent (C++11) 获取数组类型在指定维数的大小 (类模板) remove_extent (C++11) 从给定数组类型...
std::is_array 定义于头文件<type_traits> template<classT> structis_array; (C++11 起) 检查T是否数组类型。若T为数组类型,则提供等于true的成员常量value。否则,value等于false。 添加is_array或is_array_v(C++17 起)的特化的程序行为未定义。
std::is_array std::is_assignable std::is_base_of std::is_bind_expression std::is_class std::is_compound std::is_const std::is_constructible std::is_convertible std::is_copy_assignable std::is_copy_constructible std::is_default_constructible std::is_destructible std::is_empty std::is...
std::is_array std::is_assignable std::is_base_of std::is_bind_expression std::is_class std::is_compound std::is_const std::is_constructible std::is_convertible std::is_copy_assignable std::is_copy_constructible std::is_default_constructible std::is_destructible std::is_empty std::is...
is_array<> (C++11 起)is_array_v<> (C++17 起)is_assignable<> (C++11 起)is_assignable_v<> (C++17 起)is_base_of<> (C++11 起)is_base_of_v<> (C++17 起)is_bind_expression<> (C++11 起)is_bind_expression_v<> (C++17 起)is_bounded_array<> (C++20 起)is_bounded_array_v<>...