fork(2) download
  1. #include <array>
  2.  
  3. struct A {
  4. std::pair<int, int> b[3];
  5. };
  6.  
  7. template <typename T1, typename T2>
  8. struct my_pair {
  9. T1 first;
  10. T2 second;
  11. };
  12.  
  13. int main()
  14. {
  15. std::array<my_pair<int, int>, 3> b{{1, 11}, {2, 22}, {3, 33}};
  16. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
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}};
                                                                 ^
stdout
Standard output is empty