개요
- is_bounded_array
- is_unbounded_array
- T가 범위가 정해지지 않은 배열 유형인지 확인
예제
- 코드
#include <iostream>
#include <type_traits>
using namespace std;
int main() {
cout << is_bounded_array<int>::value << endl;
cout << is_bounded_array_v<int> << endl;
cout << is_bounded_array_v<int[]> << endl;
cout << is_bounded_array_v<int[3]> << endl;
cout << endl << "------" << endl << endl;
cout << is_unbounded_array<int>::value << endl;
cout << is_unbounded_array_v<int> << endl;
cout << is_unbounded_array_v<int[]> << endl;
cout << is_unbounded_array_v<int[3]> << endl;
return 0;
}
- 실행 결과