Language
C++
Compiler
gcc HEAD 10.0.0 20190513 (experimental)
Options
Warnings
Boost 1.70.0
C++14
no pedantic
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.70.0/gcc-head/include -std=c++14
Exit Code:
1
Author
anonymous
about 6 years ago
C++
gcc HEAD 10.0.0 20190513 (experimental)
Author
anonymous
about 6 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.70.0/gcc-head/include -std=c++14
prog.cc: In function 'const char* make_chars(unsigned int)':
prog.cc:14:28: error: cannot bind non-const lvalue reference of type 'std::pair<std::__detail::_Node_iterator<std::pair<const unsigned int, std::array<char, 4> >, false, false>, bool>&' to an rvalue of type 'std::pair<std::__detail::_Node_iterator<std::pair<const unsigned int, std::array<char, 4> >, false, false>, bool>'
14 | auto &i = my_map.insert({value, buffer});
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
prog.cc:16:23: error: invalid types 'bool[int]' for array subscript
16 | return &i.second[0];
| ^