|
Boost : |
Subject: Re: [boost] [functors] proposal
From: Krzysztof Czainski (1czajnik_at_[hidden])
Date: 2013-10-23 09:01:14
2013/10/23 Piotr Wygocki <vwygos_at_[hidden]>
> I'd like to reestablish my use case. My previous post was messy (sorry!).
> We've got a class which can be modified by some functors.
> This functors have default values:
>
> template <typename SomeAction = SkipFunctor, typename StopCondidtion
> =ReturnFalseFunctor>
> struct Algorithm {
> Algorithm(SomeAction action = SomeAction(), StopCondidtion =
> StopCondition());
>
> };
>
> Could you solve this using constructions from phoenix?
> The second question is of course: is this a good design?
>
Aha,
so would something like removing the defaults from the class Algorithm, and
providing a set of make_Algorithm functions solve your problem?
HTH,
Kris
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk