Boost logo

Boost :

From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2002-04-17 01:40:07


"Ani Taggu" <ataggu_at_[hidden]> wrote in message
news:a9iihu$omm$1_at_main.gmane.org...
> One minor suggestion when moving AbstractFactory to boost -- it
seems like a
> good idea to use
>
> typename ProductCreator=boost::function<AbstractProduct*>
> instead of
> typename ProductCreator = AbstractProduct* (*)()

Funny you should mention that. Mat Marcus and I were talking only
today over lunch, and he pointed out that most of the time he wants to
use a functor most of the time, in order to be able to store state.

I guess using a functor by default is fine. I have chosen that default
to be the creator of least overhead.

Andrei


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