确实很烦,一层层返回去。
// 1
template<class A>
struct std_array_helper {
using type=A;
};
// 2
template<class A>
using array_t = typename std_array_helper<A>::type;
// 3
template<class T, std::size_t N0>
struct std_array_helper<T[N0]> {
using type=std::array<array_t<T>, N0>;
};
array_t<int[10][3]>
2 -> std_array_helper<int[10][3]>::type
3 -> std::array<array_t<int[10]>, 3>
2 -> std::array<std_array_helper<int[10]>::type, 3>
3 -> std::array<std::array<array_t<int>, 10>, 3>
2 -> std::array<std::array<std_array_helper<int>::type, 10>, 3>
1 -> std::array<std::array<int, 10>, 3>
--
FROM 125.118.30.*