Author
anonymous
almost 7 years ago
Language
C++
Compiler
gcc 4.9.2
Options
Warnings
Boost 1.64.0
C++14(GNU)
no pedantic
Author
anonymous
almost 7 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.64.0/gcc-4.9.2/include -std=gnu++14
prog.cc: In function 'int main()':
prog.cc:6:10: error: no match for 'operator=' (operand types are '__gnu_cxx::__normal_iterator<char*, std::basic_string<char> >' and 'void')
iter = str.insert(next(iter), addition.begin(), addition.end()); // Error
^
prog.cc:6:10: note: candidates are:
In file included from /opt/wandbox/gcc-4.9.2/include/c++/4.9.2/bits/stl_algobase.h:67:0,
from /opt/wandbox/gcc-4.9.2/include/c++/4.9.2/bits/char_traits.h:39,
from /opt/wandbox/gcc-4.9.2/include/c++/4.9.2/string:40,
from prog.cc:1:
/opt/wandbox/gcc-4.9.2/include/c++/4.9.2/bits/stl_iterator.h:709:11: note: __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >& __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >::operator=(const __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >&)
class __normal_iterator
^
/opt/wandbox/gcc-4.9.2/include/c++/4.9.2/bits/stl_iterator.h:709:11: note: no known conversion for argument 1 from 'void' to 'const __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >&'
/opt/wandbox/gcc-4.9.2/include/c++/4.9.2/bits/stl_iterator.h:709:11: note: __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >& __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >::operator=(__gnu_cxx::__normal_iterator<char*, std::basic_string<char> >&&)
/opt/wandbox/gcc-4.9.2/include/c++/4.9.2/bits/stl_iterator.h:709:11: note: no known conversion for argument 1 from 'void' to '__gnu_cxx::__normal_iterator<char*, std::basic_string<char> >&&'
Exit Code:
1