Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-07-19 09:36:38


From: "Giovanni Bajo" <giovannibajo_at_[hidden]>
> From: "Peter Dimov" <pdimov_at_[hidden]>
>
> > Do you think that it might be a good idea to allow boost::function's
> > declared as:
> >
> > function< void (*) (char const * name, int mode) > pf;
> >
> > ?
>
> Is there any specific reason to support such a syntax? function<void, char
> const*, int> seems good enough to me.

It's good enough, when you know that the return type is the first in the
list, and you don't need the parameter names.

function< void, char const * /*name*/, int /*mode*/ > is acceptable, but the
above is still clearer for people that encounter function<> for the first
time. You can always use

function<void, char const *, int> pf; // void pf(char const * name, int
mode)

of course. :-)


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