how to access struct member using [] operator?

ag0aep6g via Digitalmars-d-learn digitalmars-d-learn at
Sun Sep 25 09:40:42 PDT 2016

On 09/25/2016 06:26 PM, Basile B. wrote:
> Can we get an explanation from a compiler guy ? It seems the the switch
> statement is already evaluated at compiled time...

Lodovico has already answered this.

It's just an ordinary `auto` return type function. The actual return 
type is the common type of the different returns. Note that it falls 
apart when you add member with an incompatible type, like `string` or 

More information about the Digitalmars-d-learn mailing list