Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Language

Compiler

Options

typename.h

$
In file included from prog.cc:2:0:
prog.cc: In function 'int main()':
prog.cc:21:32: error: operands to ?: have different types 'int' and 'Bar'
     std::cout << TYPENAME(true ?data:bar) << "\n";
                                ^
prog.cc:21:18: note: in expansion of macro 'TYPENAME'
     std::cout << TYPENAME(true ?data:bar) << "\n";
                  ^
prog.cc:21:32: note:   and each type can be converted to the other
     std::cout << TYPENAME(true ?data:bar) << "\n";
                                ^
prog.cc:21:18: note: in expansion of macro 'TYPENAME'
     std::cout << TYPENAME(true ?data:bar) << "\n";
                  ^
Exit Code:
1