Generic operator overloading for immutable types?
Kagamin via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Jun 14 05:28:26 PDT 2017
On Tuesday, 13 June 2017 at 19:29:26 UTC, Gary Willoughby wrote:
> Is it possible for the `result` variable in the following code
> to be returned as an immutable type if it's created by adding
> two immutable types?
Why do you even want that? Such plain data structure is
implicitly convertible to any const flavor:
https://dpaste.dzfl.pl/c59c4c7131b2
More information about the Digitalmars-d-learn
mailing list