description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | |||
---|---|---|---|---|---|---|---|---|
Learn more about: is_array Class | is_array Class | 11/04/2016 |
|
| 61fb2201-8de3-4746-9721-617f02df170f |
Tests if type is array.
template <classTy> structis_array;
Ty
The type to query.
An instance of the type predicate holds true if the type Ty is an array type, otherwise it holds false.
// std__type_traits__is_array.cpp// compile with: /EHsc #include<type_traits> #include<iostream>structtrivial { int val; }; intmain() { std::cout << "is_array<trivial> == " << std::boolalpha << std::is_array<trivial>::value << std::endl; std::cout << "is_array<int> == " << std::boolalpha << std::is_array<int>::value << std::endl; std::cout << "is_array<int[5]> == " << std::boolalpha << std::is_array<int[5]>::value << std::endl; return (0); }
is_array<trivial> == false is_array<int> == false is_array<int[5]> == true
Header: <type_traits>
Namespace: std