How to document a function object with doxygen?

How should I document a function object (AKA functor) with doxygen? It feels misleading to just document it as a regular class. I find it much better to think of a function object as a function with a closure than a callable class.

Is there a way to document a function object that fits with my preferences?

class Adder
{
public:
   Adder( size_t x ) :
      m_x(x)
   { }

   size_t operator () ( size_t y ) const
   {
      return m_x + y;
   }

private:
   const size_t m_x;
};
9
задан deft_code 5 March 2011 в 18:01
поделиться