On Saturday, 16 May 2015 at 09:56:22 UTC, Jakob Ovrum wrote:
It can be implemented in a backwards-compatible way as a
subtype of a Tuple.
struct FindSplit(R)
{
Tuple!(R, "pre", R, "separator", R, "post") asTuple;
bool opCast(T : bool)()
{
return !asTuple.separator.empty;
}
alias asTuple this;
}
Tuple!(R, "pre", R, "separator", R, "post") is a subtype of
Tuple!(R, R, R), which should be the current return type.
Nice! Should I make a PR?
