On 06/08/2015 10:12 AM, Larry Evans wrote: [snip]
wrappers. Why not provide wrapper's tagged by some enumerable? For example, something like this:
template < typename X , typename Enumerable=unsigned , Enumerable tag=Tag() > struct _tagged //instead of _left and _right : operators::adl { X value; . . . template
constexpr decltype(auto) go(F...&& f) const& { return (hana::arg (f...))(value); } . . . }; This would be more general than the binary Either. In addition, _tagged could be used elsewhere. For example, it could be used in a multiple inheritance implementation of tuple.
Which I see hana actually does here:
https://github.com/ldionne/hana/blob/master/include/boost/hana/detail/closur...
but instead of _tagged