Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 5 years ago

Language

C++

Compiler

gcc HEAD 11.0.0 20200805 (experimental)

Options
Warnings
Boost 1.73.0
C++2a(GNU)
no pedantic

Author

anonymous

almost 5 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);
      |                                           ^
Exit Code:
1