Skip to content

Constrain Counter Arithmetic to unsigned integral and limit the scope of +=

Counter<> should only allow unsigned integral Arithmetic and we should prevent code like this to compile:

Counter<> c;
c += 5.3;  // implicit rounding happens!
c += -10;   // what does this mean?

See !1336 (comment 5555460)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information