Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 7 years ago

Language

Compiler

Options

Author

anonymous

over 7 years ago

$
prog.cc:4:18: error: 'foo' is neither function nor member function; cannot be declared friend
         friend T foo;
                  ^~~
prog.cc: In instantiation of 'class Bar<void()>':
prog.cc:8:21:   required from here
prog.cc:4:18: error: field 'Bar<void()>::foo' invalidly declared function type
prog.cc: In function 'void foo()':
prog.cc:9:13: error: 'int Bar<void()>::foobar' is private within this context
         bar.foobar = 1;
             ^~~~~~
prog.cc:3:13: note: declared private here
         int foobar;
             ^~~~~~
Exit Code:
1