Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2003-05-12 08:40:06


On Monday 12 May 2003 06:36 am, Daniel Frey wrote:
> Thomas Witt wrote:
> > struct my_functor :
> > public boost::function_traits<int(double)>
> > {
> > // ...
> > };
>
> I like it, too. The only thing that I don't like is the name. Used like
> this, it no longer has traits semantics IMHO.

I'd say it still has traits semantics, and Thomas just wants to take advantage
of some typedefs.

> Thus I'd prefer:
>
> struct my_functor : boost::function< int( double ) >
> {
> // ...
> };
>
> Maybe it makes sense to provide both names to get a clearer distinction
> between the traits and the functor-base. One can use the other to be
> implemented easily.

I still like the name function_traits, but in any case it can't be
boost::function because that name is already taken.

        Doug


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