Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 7 years ago

Language

C++

Compiler

gcc HEAD 9.0.0 20190116 (experimental)

Options
Don't Use Boost
C++17
-pedantic-errors

Author

anonymous

almost 7 years ago

$ g++ prog.cc -std=c++17 -pedantic-errors
prog.cc: In function 'int main()':
prog.cc:11:21: error: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
   11 |    std::cout << foo("Hello", "World!") << std::endl;
      |                     ^~~~~~~
prog.cc:11:30: error: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
   11 |    std::cout << foo("Hello", "World!") << std::endl;
      |                              ^~~~~~~~
Exit Code:
1