Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/types/extent"

From cppreference.com
< cpp‎ | types
(Created page with "{{cpp/title|extent}} {{cpp/types/sidebar}} {{ddcl list begin}} {{ddcl list header | type_traits}} {{ddcl list item | notes={{mark c++11 feature}} | 1= template< class T, unsigned...")
 
m (templated see-also list items.)
Line 59: Line 59:
 
===See also===
 
===See also===
 
{{dcl list begin}}
 
{{dcl list begin}}
{{dcl list tclass | cpp/types/rank | obtains the number of dimensions of an array type | notes={{mark c++11}}}}
+
{{dcl list template | cpp/types/dcl list is_array}}
{{dcl list tclass | cpp/types/is_array | checks if a type is an array type | notes={{mark c++11}}}}
+
{{dcl list template | cpp/types/dcl list rank}}
{{dcl list tclass | cpp/types/remove_extent | removes one extent from the given array type | notes={{mark c++11}}}}
+
{{dcl list template | cpp/types/dcl list remove_extent}}
{{dcl list tclass | cpp/types/remove_all_extents | removes all extents from the given array type | notes={{mark c++11}}}}
+
{{dcl list template | cpp/types/dcl list remove_all_extents}}
 
{{dcl list end}}
 
{{dcl list end}}

Revision as of 05:51, 7 September 2011

Template:cpp/types/sidebar Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <type_traits>
</td>

<td></td> <td></td> </tr> <tr class="t-dcl ">

<td >
template< class T, unsigned N = 0>
struct extent;
</td>

<td class="t-dcl-nopad"> </td> <td > Template:mark c++11 feature </td> </tr> Template:ddcl list end

If T is an array type, provides the member constant value equal to the number of elements along the Nth dimension of the array, if N is in [0, std::rank<T>::value). For any other type, or if T is array of unknown bound along its first dimension and N is 0, value is 0.

Contents

Member objects

Template:tdcl list begin Template:tdcl list hitem Template:tdcl list item Template:tdcl list end

Equivalent definition

Template:eq fun cpp

Example

Template:example cpp

See also

(C++11)
checks if a type is an array type
(class template) [edit]
(C++11)
obtains the number of dimensions of an array type
(class template) [edit]
removes one extent from the given array type
(class template) [edit]
removes all extents from the given array type
(class template) [edit]