Language
C++
Compiler
gcc 9.3.0
Options
Warnings
Boost 1.73.0
C++2a(GNU)
no pedantic
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/gcc-9.3.0/include -std=gnu++2a
Exit Code:
1
Author
anonymous
almost 4 years ago
C++
gcc 9.3.0
Author
anonymous
almost 4 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/gcc-9.3.0/include -std=gnu++2a
prog.cc: In function 'int main()':
prog.cc:10:24: error: no matching function for call to 'compare(const char [3], const char [4])'
10 | compare("hi", "mom");
| ^
prog.cc:4:5: note: candidate: 'template<unsigned int N, unsigned int M> int compare(const char*, const char*)'
4 | int compare(char const p1[N], char const p2[M])
| ^~~~~~~
prog.cc:4:5: note: template argument deduction/substitution failed:
prog.cc:10:24: note: couldn't deduce template parameter 'N'
10 | compare("hi", "mom");
| ^