that is bug?

meppl mephisto at nordhoff-online.de
Sat Apr 7 11:19:44 UTC 2018


On Saturday, 7 April 2018 at 10:25:19 UTC, bauss wrote:
> On Saturday, 7 April 2018 at 09:07:48 UTC, sdvcn wrote:
>>
>>         true?stt="AA":stt="BB";    <<<<-----///Out:BB
>
> It's an UB.
>
> Not a bug.


I want `condition ? expr1 : expr2` to behave like:

-----
auto qc( alias condition, string expr1, string expr2)() {
	if( condition) {
		return mixin( expr1);
	} else {
		return mixin( expr2);
	}
}
-----



More information about the Digitalmars-d mailing list