Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 2 years ago

Language

C++

Compiler

clang HEAD 18.0.0 (https://github.com/llvm/llvm-project.git cf5d8def5cf66fbdfffa00a4845bd648ec58ed60)

Options
Warnings
Don't Use Boost
C++2b(GNU)
no pedantic
Raw compiler options
-stdlib=libc++

Author

anonymous

almost 2 years ago

$ clang++ prog.cc -Wall -Wextra -std=gnu++2b -stdlib=libc++
prog.cc:5:23: warning: unused parameter 'args' [-Wunused-parameter]
    5 | void f(const Args&... args, std::source_location loc = std::source_location::current()) {
      |                       ^
prog.cc:11:3: error: no matching function for call to 'f'
   11 |   f(567);
      |   ^
prog.cc:5:6: note: candidate function template not viable: no known conversion from 'int' to 'std::source_location' for 1st argument
    5 | void f(const Args&... args, std::source_location loc = std::source_location::current()) {
      |      ^ ~~~~~~~~~~~~~~~~~~~
prog.cc:12:3: error: no matching function for call to 'f'
   12 |   f(567, 789);
      |   ^
prog.cc:5:6: note: candidate function template not viable: no known conversion from 'int' to 'std::source_location' for 1st argument
    5 | void f(const Args&... args, std::source_location loc = std::source_location::current()) {
      |      ^ ~~~~~~~~~~~~~~~~~~~
1 warning and 2 errors generated.
Exit Code:
1