|
Boost : |
From: François Wanadoo (francois.amelie_at_[hidden])
Date: 2002-12-06 15:58:48
Hello Boosters
I am currently developing some template algorithm and had some trouble
using BCCL. I have an algorithm using a unary function as one of its
template parameter but I don't care about the result type of this unary
function (like the for_each standard algo). I can't use the
UnaryFunctionConcept because you have to stipulate the result type. What do
you think about creating a boost::AnyType to indicate that we don't care
about a type in a template specialization. A very simple partial
specialization of UnaryFunctionConcept would lead to:
template <class Func, class Arg>
struct UnaryFunctionConcept<Func, AnyType, Arg> {
void constraints() {
f(arg);
}
Func f;
Arg arg;
};
I know it is the same specialization that for the void result type and I
could have use it but I don't want to use it because I don't want a void
unary function I want a AnyType unary function!
I also want to signal that the type_traits/conversion_traits.hpp file is
included twice in the concept_check.hpp.
I am waiting for your remarks, thank you for reading.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk