Can we disallow appending integer to string?
Stanislav Blinov via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Apr 20 15:39:01 PDT 2017
On Thursday, 20 April 2017 at 19:20:28 UTC, H. S. Teoh wrote:
> Another pernicious thing I encountered recently, related to
> implicit conversions, is this:
>
> https://issues.dlang.org/show_bug.cgi?id=17336
>
> It drew a very enunciated "WAT?!" from me.
Yeah, that one is annoying. I've dealt with this before with:
alias OpResult(string op, A, B) = typeof((){ A* a; B* b; return
mixin("*a"~op~"*b"); }());
More information about the Digitalmars-d-learn
mailing list