
I've done some research and found nontemplate comparison structs (less,
greater...) here:
./boost/log/utility/functional/logical.hpp
Sorry for confusion.
Should we move it to ./boost/utility ?
Regards,
Piotr
On 23 October 2013 15:10, Piotr Wygocki
Sure, but
1) Not everybody can construct the class using make_Algorithm. (decltype(make_Algorithm()) looks weird). 2) You need many overloads of make_Algorithm function (the number of overloads equals number of arguments + 1). In my solution you need only one overload.
Regards,
Piotr
On 23 October 2013 15:01, Krzysztof Czainski <1czajnik@gmail.com> wrote:
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
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost