rank Class
Získá počet rozměrů pole.
template<class Ty>
struct rank;
Parametry
- Ty
Typ dotazu.
Poznámky
Typ dotazu obsahuje hodnotu počet rozměrů pole typu Ty, nebo 0, pokud Ty není typu pole.
Příklad
// std_tr1__type_traits__rank.cpp
// compile with: /EHsc
#include <type_traits>
#include <iostream>
int main()
{
std::cout << "rank<int> == "
<< std::rank<int>::value << std::endl;
std::cout << "rank<int[5]> == "
<< std::rank<int[5]>::value << std::endl;
std::cout << "rank<int[5][10]> == "
<< std::rank<int[5][10]>::value << std::endl;
return (0);
}
Požadavky
Záhlaví: <type_traits>
Obor názvů: std