Language
C++
Compiler
gcc HEAD 10.0.0 20190605 (experimental)
Options
Warnings
Boost 1.69.0
C++2a(GNU)
no pedantic
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.69.0/gcc-head/include -std=gnu++2a
Exit Code:
1
C++
gcc HEAD 10.0.0 20190605 (experimental)
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.69.0/gcc-head/include -std=gnu++2a
prog.cc: In function 'int main()':
prog.cc:12:15: error: cannot bind non-const lvalue reference of type 'std::vector<int>&' to an rvalue of type 'std::vector<int>'
12 | foo0(std::vector<int>());
| ^~~~~~~~~~~~~
prog.cc:4:29: note: initializing argument 1 of 'void foo0(std::vector<int>&)'
4 | void foo0(std::vector<int>& vec)
| ~~~~~~~~~~~~~~~~~~^~~