Skip to content

Latest commit

 

History

History
71 lines (53 loc) · 1.34 KB

is-array-class.md

File metadata and controls

71 lines (53 loc) · 1.34 KB
descriptiontitlems.datef1_keywordshelpviewer_keywordsms.assetid
Learn more about: is_array Class
is_array Class
11/04/2016
type_traits/std::is_array
is_array class
is_array
61fb2201-8de3-4746-9721-617f02df170f

is_array Class

Tests if type is array.

Syntax

template <classTy> structis_array;

Parameters

Ty
The type to query.

Remarks

An instance of the type predicate holds true if the type Ty is an array type, otherwise it holds false.

Example

// 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 

Requirements

Header: <type_traits>

Namespace: std

See also

<type_traits>
extent Class
rank Class

close