#include <array>
using namespace std;
template <typename T, size_t N>
struct YobaAr : array<T, N>
{
using array<T, N>::template array<T, N>;
};
int main() {
YobaAr<int, 3> test {1, 2, 3};
for (int t : test)
cout << t << endl;
return 0;
}
I2luY2x1ZGUgPGFycmF5PgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCnRlbXBsYXRlIDx0eXBlbmFtZSBULCBzaXplX3QgTj4Kc3RydWN0IFlvYmFBciA6IGFycmF5PFQsIE4+CnsKCXVzaW5nIGFycmF5PFQsIE4+Ojp0ZW1wbGF0ZSBhcnJheTxULCBOPjsKfTsKCmludCBtYWluKCkgewoJWW9iYUFyPGludCwgMz4gdGVzdCB7MSwgMiwgM307CiAgICBmb3IgKGludCB0IDogdGVzdCkKCQljb3V0IDw8IHQgPDwgZW5kbDsKCXJldHVybiAwOwp9
prog.cpp:8:21: error: expected unqualified-id before 'template'
using array<T, N>::template array<T, N>;
^
prog.cpp:8:21: error: expected ';' before 'template'
prog.cpp:8:30: error: expected '<'
using array<T, N>::template array<T, N>;
^
prog.cpp:8:30: error: 'array<T, N>' does not name a type
prog.cpp: In function 'int main()':
prog.cpp:12:30: error: no matching function for call to 'YobaAr<int, 3u>::YobaAr(<brace-enclosed initializer list>)'
YobaAr<int, 3> test {1, 2, 3};
^
prog.cpp:12:30: note: candidates are:
prog.cpp:6:8: note: YobaAr<int, 3u>::YobaAr()
struct YobaAr : array<T, N>
^
prog.cpp:6:8: note: candidate expects 0 arguments, 3 provided
prog.cpp:6:8: note: constexpr YobaAr<int, 3u>::YobaAr(const YobaAr<int, 3u>&)
prog.cpp:6:8: note: candidate expects 1 argument, 3 provided
prog.cpp:6:8: note: constexpr YobaAr<int, 3u>::YobaAr(YobaAr<int, 3u>&&)
prog.cpp:6:8: note: candidate expects 1 argument, 3 provided
prog.cpp:14:3: error: 'cout' was not declared in this scope
cout << t << endl;
^
prog.cpp:14:16: error: 'endl' was not declared in this scope
cout << t << endl;
^