Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 3 years ago

Language

C++

Compiler

clang 14.0.0

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

Author

anonymous

about 3 years ago

$ clang++ prog.cc -Wall -Wextra -std=c++17 -pedantic-errors
prog.cc:2:45: warning: unused parameter 'opt' [-Wunused-parameter]
void foo(void (*func)(T...), T... args, int opt)
                                            ^
prog.cc:11:5: error: no matching function for call to 'foo'
    foo(&bar, 1, 2, 3);
    ^~~
prog.cc:2:6: note: candidate template ignored: deduced packs of different lengths for parameter 'T' (<int, int> vs. <>)
void foo(void (*func)(T...), T... args, int opt)
     ^
1 warning and 1 error generated.
Exit Code:
1