remove_all_extents Class

 

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

Makes non array type from array type.

template <class T>
struct remove_all_extents;

template <class T>  
using remove_all_extents_t = typename remove_all_extents<T>::type;

Parameters

T
The type to modify.

An instance of remove_all_extents<T> holds a modified-type that is the element type of the array type T with all array dimensions removed, or T if T is not an array type.

#include <type_traits>   
#include <iostream>   
  
int main()   
    {   
    std::cout << "remove_all_extents<int> == "   
        << typeid(std::remove_all_extents_t<int>).name()   
        << std::endl;   
    std::cout << "remove_all_extents_t<int[5]> == "   
        << typeid(std::remove_all_extents_t<int[5]>).name()   
        << std::endl;   
    std::cout << "remove_all_extents_t<int[5][10]> == "   
        << typeid(std::remove_all_extents_t<int[5][10]>).name()   
        << std::endl;   
  
    return (0);   
    }  
  

Header: <type_traits>

Namespace: std

<type_traits>
remove_extent Class

Show: