Boost logo

Boost :

From: Guillaume Melquiond (guillaume.melquiond_at_[hidden])
Date: 2007-07-28 04:22:17


Le samedi 28 juillet 2007 à 09:47 +0200, Daniel Frey a écrit :

> Which does not instantiate a template and is a clear and documented way
> to show that you really meant to have a parameter which is not used. As
> a third option, we could add
>
> #define BOOST_UNUSED_PARAMETER
>
> and use it like this:
>
> void f( int BOOST_UNUSED_PARAMETER )
>
> just in case you want to avoid block-comments in your code.

I would suggest going a bit further and have:

  #define BOOST_UNUSED_PARAMETER(x)
  void f(int BOOST_UNUSED_PARAMETER(meaningful_name))

so that the Doxygen-generated documentation (e.g. for BoostBook and
QuickBook) contains meaningful parameter names, once we add the
following line to Doxygen's configuration file:

  PREDEFINED = BOOST_UNUSED_PARAMETER(x)=x

Best regards,

Guillaume


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk