Skip to content

Latest commit

 

History

History
63 lines (46 loc) · 1.43 KB

remove-all-extents-class.md

File metadata and controls

63 lines (46 loc) · 1.43 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: remove_all_extents Class
remove_all_extents Class
11/04/2016
type_traits/std::remove_all_extents
remove_all_extents class
remove_all_extents
548dc536-82e7-423a-b8c1-443d66d9632e

remove_all_extents Class

Makes non array type from array type.

Syntax

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.

Remarks

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.

Example

#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);
    }

Requirements

Header: <type_traits>

Namespace: std

See also

<type_traits>
remove_extent Class