bsl
bsl copied to clipboard
Example test in readme.md doesn't really test addition
The example code in README.md aims to test the +=
operator of safe_umx
, but because it adds 42 to 0, it would also pass if the operator was (incorrectly) implemented as an assignment instead of an addition (as zero is the identity element of addition).
The fix would be to initialize data2
to a non-zero value.
https://github.com/Bareflank/bsl/blob/6509cfff948fa34b98585512d7be33a36e2f9522/README.md?plain=1#L139-L144