Generic operator overloading for immutable types?
Gary Willoughby via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Jun 13 00:42:52 PDT 2017
On Monday, 12 June 2017 at 20:10:17 UTC, H. S. Teoh wrote:
> Therefore, nowadays I always recommend writing parenthesis with
> type modifiers, so that the intent it unambiguous, i.e., always
> write `inout(Rational)` rather than `inout Rational`, unless
> you intend for `inout` to apply to the function rather than the
> return value. (And I apologize for the slip-up in my code
> example above, where I failed to do this for the function
> parameter.)
>
>
> T
Ok, thanks.
More information about the Digitalmars-d-learn
mailing list