Boost logo

Boost :

From: Christian Holmquist (c.holmquist_at_[hidden])
Date: 2007-07-17 10:21:02


To me it would be reasonable that unfused_typed, given its name, only
generated the operator to create exactly the sequence type provided. I was
surprised it didn't at first, but since it was clearly documented how to
avoid this behaviour I didn't think too much about it. If this feature
requires extra tweaks, wouldn't it be easier to avoid it? Is it some
particular case you have in mind where one would want to to
default-initialize parts of the sequence?

Regards,

> > 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