
On 7/17/07, Stjepan Rajko <stipe@asu.edu> wrote:
On 7/17/07, Tobias Schwinger <tschwinger@isonews2.com> wrote:
Christian Holmquist wrote:
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.
Hmm... now that I think of it, I guess in something I was working on I implemented a "has_result_of" trait that checks for either existence of result_type, or the right result overload... that might also work here, but I'm not sure how my has_result_of implementation fares, and whether it can be fixed to use result_of directly (i tried and failed for some reason) and also work when result_of is a typeof forwarder. So I don't know about whether this might also be an avenue.
... I guess I called it "result_of_defined" - the code is at http://tinyurl.com/23xz6t if you have any feedback. Stjepan