Boost logo

Boost :

From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2007-07-17 08:37:14


Hello Christian,

Christian Holmquist wrote:
> Hello,
> I decided to mail you directly not to spam the boost dev-list with
> minor questions, hope it's ok.

Sure, but I think we're not spamming ;-). To the contrary, it's valuable
to discuss this stuff on-list (forwarding to boost.devel -- hoping it's
OK), because ...

> My question is how to disable the call operators with fewer arguments
> than specified by Sequence, generated by unfused_typed<F, Sequence>.
> Before the switch to boost::result_of one could specialize the result
> struct to only handle the expected Sequence type, thus disabling
> unwanted operators. I'm not familiar with boost::result_of to describe
> this however.

... I removed that kind of control over the overload sets of the Fusion
functional adapters (you can't pass emptiness through result_of), but
I'm not really happy about it.

<snip code>
> Any ideas?
Currently I think it might be best to re-add that mechanism for the
'unfused_*' adapters, either by checking nested 'result' of the target
function for emptiness (exploiting SFINAE where applicable) or by
introducing a special type (e.g. 'fusion::undefined_function'), that
when returned from 'result_of' disables the overload...

Thoughts anyone?

Regards,
Tobias


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk