Presently, I am using the following function template to suppress unused variable warnings:
template
void
unused(T const &) {
/* Do n
The actual way of indicating you don't actually use a parameter is not giving it a name:
int f(int a, float) {
return a*2;
}
will compile everywhere with all warnings turned on, without warning about the unused float. Even if the argument does have a name in the prototype (e.g. int f(int a, float f);
), it still won't complain.