Operator Overloading with multiple return types

Sebastiaan Koppe mail at skoppe.eu
Fri Mar 15 21:43:26 UTC 2019


On Friday, 15 March 2019 at 21:35:12 UTC, eXodiquas wrote:
> Is there any way to achive this behaivour with D2?

Yep. Just make the return type in the function declaration 
`auto`. You are then free to return a different type in each 
static branch.


More information about the Digitalmars-d-learn mailing list