Using UNREFERENCED_PARAMETER macro

I would prefer commenting the parameters.

The macro UNREFERENCED_PARAMETER is defined in winnt.h and therefore not portable.

And if later you do reference it, you might overlook to remove the macro.

Edit: With C++17 you can now use the [[maybe_unused]] attribute. This is useful for code depending on preprocessor macros:

void foo( [[maybe_unused]] int value )
{
#ifdef USE_VALUE
   useValue(value);
#endif
}

Now there won't be warnings even if USE_VALUE is undefined.


I consider the name-removing version the first to go with. It can have a disadvantage to confuse the information system so tooltip shows the crippled version. But healthy ones would use the declaration, where the names are there. (and for static and one-use things you should not have unused params, right?)

Otherwise it's matter of taste really.