Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Makes element type from array type.
template<class Ty>
struct remove_extent;
Parameters
- Ty
The type to modify.
Remarks
An instance of the type modifier holds a modified-type that is Ty1 when Ty is of the form Ty1[N], otherwise Ty.
Example
// std_tr1__type_traits__remove_extent.cpp
// compile with: /EHsc
#include <type_traits>
#include <iostream>
int main()
{
std::cout << "remove_extent<int> == "
<< typeid(std::tr1::remove_extent<int>::type).name()
<< std::endl;
std::cout << "remove_extent<int[5]> == "
<< typeid(std::tr1::remove_extent<int[5]>::type).name()
<< std::endl;
std::cout << "remove_extent<int[5][10]> == "
<< typeid(std::tr1::remove_extent<int[5][10]>::type).name()
<< std::endl;
return (0);
}
remove_extent<int> == int remove_extent<int[5]> == int remove_extent<int[5][10]> == int [10]
Requirements
Header: <type_traits>
Namespace: std::tr1