#include <array> struct A { std::pair<int, int> b[3];}; template <typename T1, typename T2>struct my_pair { T1 first; T2 second;}; int main(){ std::array<my_pair<int, int>, 3> b{{1, 11}, {2, 22}, {3, 33}};}
Standard input is empty
prog.cpp: In function ‘int main()’: prog.cpp:15:65: error: too many initializers for ‘std::array<my_pair<int, int>, 3ul>’ std::array<my_pair<int, int>, 3> b{{1, 11}, {2, 22}, {3, 33}}; ^
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!