std::extent() template in C++ with Examples
The std::is_const template of C++ STL is present in the <type_traits> header file. If A is an array that has a rank greater than B, the extent is the bound of the Ath dimension and if B is zero and A is the array of unknown bound, than the extent value is zero.
template <class A, unsigned B = 0> struct extent;
Parameters: It accepts the following parameters:
- A : It represents a particular type.
- B : It represents the dimensions for which the extent is to be obtained.
Below are the programs to demonstrate std::extent():
3 3 4 0 0 4
gfg array (int): rank: 3 0 50 70 0
My Personal Notes arrow_drop_up
Please Login to comment...