fork download
  1. #include <vector>
  2. #include <array>
  3.  
  4. int main(){
  5. std::vector<std::array<int, 3>> v;
  6. v.push_back({1,2,3});
  7. }
  8.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:6:22: error: no matching function for call to 'std::vector<std::array<int, 3u> >::push_back(<brace-enclosed initializer list>)'
/usr/lib/gcc/i686-pc-linux-gnu/4.5.1/../../../../include/c++/4.5.1/bits/stl_vector.h:741:7: note: candidates are: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::array<int, 3u>, _Alloc = std::allocator<std::array<int, 3u> >, value_type = std::array<int, 3u>]
/usr/lib/gcc/i686-pc-linux-gnu/4.5.1/../../../../include/c++/4.5.1/bits/stl_vector.h:754:7: note:                 void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::array<int, 3u>, _Alloc = std::allocator<std::array<int, 3u> >, value_type = std::array<int, 3u>]
stdout
Standard output is empty