
23 Oct
2013
23 Oct
'13
1:01 p.m.
2013/10/23 Piotr Wygocki
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