Re: [Boost-users] Some thoughts on Unary / BinaryFunctionConcept limitations

That looks like a bug. Here's a challenge for you: how would you fix this bug?
In my own functor concept implementation, I used the function-pointer trick to make it work: ==== CODE ==== template<typename Func, typename Ret, typename Arg> struct special_UnaryFunctionConcept { void constraints() { Ret (Func::*x) (Arg) = Func::operator(); } }; ==============
I'm sure there is a way. Can you think of a way to do it? Perhaps the boost preprocessor library would help.
Well, I was thinking that it BOOST_CLASS_REQUIREx for x > 4 could be added to the concept_check library in the same way that it is for x <= 4. Is this possible?
Yes, you need to create a typedef for such types. This restriction should be documented. I've checked in a fix to the docs.
Ok, gotcha. Interesting... Thanks, --Steve
participants (1)
-
Stephen Gross