I'm trying to get the second dimension of a 2D array using std::extent, but getting output as 0.
#include <iostream>
#include <type_traits>
int32_t main(int32_t argc, char *argv[]) {
int32_t arr[10][100];
std::cout << "first dim: " << sizeof(arr) / sizeof(*arr) << std::endl;
std::cout << "second dim: " << sizeof(*arr) / sizeof(**arr) << std::endl;
std::cout << "rank: " << std::rank<decltype(arr)>{} << std::endl;
std::cout << "first dim: " << std::extent<decltype(arr)>{} << std::endl;
std::cout << "second dim: " << std::extent<decltype(*arr)>{} << std::endl;
return EXIT_SUCCESS;
}