remove_all_extents Class

Makes non array type from array type.

template<class Ty>
    struct remove_all_extents;


The type to modify.

An instance of the type modifier holds a modified-type that is the element type of the array type Ty with all array dimensions removed, or Ty if Ty is not an array type.


// std_tr1__type_traits__remove_all_extents.cpp 
// compile with: /EHsc 
#include <type_traits> 
#include <iostream> 
int main() 
    std::cout << "remove_all_extents<int> == " 
        << typeid(std::remove_all_extents<int>::type).name() 
        << std::endl; 
    std::cout << "remove_all_extents<int[5]> == " 
        << typeid(std::remove_all_extents<int[5]>::type).name() 
        << std::endl; 
    std::cout << "remove_all_extents<int[5][10]> == " 
        << typeid(std::remove_all_extents<int[5][10]>::type).name() 
        << std::endl; 
    return (0); 

Header: <type_traits>

Namespace: std

Community Additions