Author
anonymous
almost 5 years ago
Language
Compiler
Options
Author
anonymous
almost 5 years ago
$
prog.cc: In function 'int main()':
prog.cc:8:25: warning: extended initializer lists only available with '-std=c++11' or '-std=gnu++11'
8 | svec = {{'a'}, {'b'}};
| ^
prog.cc:8:25: warning: extended initializer lists only available with '-std=c++11' or '-std=gnu++11'
prog.cc:8:25: warning: extended initializer lists only available with '-std=c++11' or '-std=gnu++11'
prog.cc:8:25: error: no match for 'operator=' (operand types are 'std::vector<std::__cxx11::basic_string<char> >' and '<brace-enclosed initializer list>')
In file included from /opt/wandbox/gcc-head/include/c++/11.0.0/vector:72,
from prog.cc:3:
/opt/wandbox/gcc-head/include/c++/11.0.0/bits/vector.tcc:198:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]'
198 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/opt/wandbox/gcc-head/include/c++/11.0.0/bits/vector.tcc:199:42: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::vector<std::__cxx11::basic_string<char> >&'
199 | operator=(const vector<_Tp, _Alloc>& __x)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
Exit Code:
1