On Monday, 19 February 2018 at 21:34:04 UTC, Simen Kjærås wrote:
On Monday, 19 February 2018 at 14:20:16 UTC, Basile B. wrote:
I had never used Checked and i discover that strangely there's no hook for opAssign. onLowerBound and onUpperBound works for +=, -=, *=, /=, %=, ^^=, &=, |=, ^=, <<=, >>=, and >>>=. But since init is 0, += works:

Ah, thanks. Filed a bug:


I think this is a design choice, it's too obvious to be an omission (it's even documented that opAssign is like the ctor).

I'm curious to know what's the rationale though.

Reply via email to