error: no declaration matches ‘void foo::test(int, int, const void*, int)’
File bad-def.cc
Line 8
Column 6
| 8 | | void foo::test(int i, int j, const void *ptr, int k) |
| | | ^~~ |
-
-
candidate is: ‘void foo::test(int, int, void*, int)’
Line 4
Column 10
| 4 | | void test(int i, int j, void *ptr, int k); |
| | | ^~~~ |
-
parameter 3 of candidate has type ‘void*’...
Line 4
Column 35
| 4 | | void test(int i, int j, void *ptr, int k); |
| | | ~~~~~~^~~ |
-
...which does not match type ‘const void*’
Line 8
Column 42
| 8 | | void foo::test(int i, int j, const void *ptr, int k) |
| | | ~~~~~~~~~~~~^~~ |
note: ‘class foo’ defined here
File bad-def.cc
Line 1
Column 7