
19 Jul
2005
19 Jul
'05
5:58 p.m.
Peter Dimov wrote:
Joel de Guzman wrote:
Jaakko Järvi wrote:
Yes, a null_type is passed to sig. This is because the signature of the zero argument lambda function (in lambda_functor class) signature is instantiated always, regardless of whether it is called or not. And there the argument list is just null_type. Hence, the return type deduction is not allowed to cause a compilation error in the case where the argument tuple to sig is null_type.
FYI, this is a typical problem. Phoenix-2 has fixed this nagging problem.
How?
By disabling the nullary operator() when appropriate (e.g. by computing the minimum arity). Cheers, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net