mixin break; in switch containing static foreach

Adam D. Ruppe destructionator at gmail.com
Tue Apr 3 19:41:35 UTC 2018


On Tuesday, 3 April 2018 at 19:31:50 UTC, Vladimirs Nordholm 
wrote:
>     switch(foo)

Put the label on the switch

whatever: switch(foo)


>             mixin(format("
>                 case Foo.%s:    bar = Bar.%s;    break;
>             ", f, f));

then use the label here

break whatever;


More information about the Digitalmars-d-learn mailing list