Language
C++
Compiler
gcc HEAD 11.0.0 20200805 (experimental)
Options
Warnings
Boost 1.73.0
C++2a(GNU)
no pedantic
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/gcc-head/include -std=gnu++2a
Exit Code:
1
Author
anonymous
over 4 years ago
C++
gcc HEAD 11.0.0 20200805 (experimental)
Author
anonymous
over 4 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/gcc-head/include -std=gnu++2a
prog.cc:10:43: error: friend declaration of 'void F(T, TF::S, int)' specifies default arguments and isn't a definition [-fpermissive]
10 | template <typename T> friend void F(T x, S s, int v = 5);
| ^
prog.cc:14:6: error: friend declaration of 'void F(T, TF::S, int)' specifies default arguments and isn't the only declaration [-fpermissive]
14 | void F(T x, TF::S s, int v)
| ^
prog.cc:10:43: note: previous declaration of 'void F(T, TF::S, int)'
10 | template <typename T> friend void F(T x, S s, int v = 5);
| ^