
Christopher D. Russell wrote:
The gist of my approach is to return another variant from the binary version of the static visitor that is bounded by a the permutations of the types of the two input variants. My plan is to then operate on the return value using the unary version of static visitor... Perhaps this isn't exactly what you had in mind but it's all I could come up with. Perhaps others will jump in and be able to suggest a better implementation?
Thanks for this hint. Returning a variant from the visitor seems to be an option for me, but I'll have to investigate it more thoroughly. Initially I've expected to find some kind of meta function allowing to specify the required return type (as used in Phoenix and as it was mentioned here already), but this may not be possible in the context of the Boost.Variant library. Thanks and regards Hartmut