We all know that C++ inherited unsafe semantics from C, but one would expect modern library features such as std::chrono to be carefully designed to avoid the old integer conversion bugs... right?
Not the case: it's very easy to silently cause truncation or overflow in correct-looking code, such as:
Try to get a compile-time diagnostic or at least a run-time error for this interface:https://godbolt.org/z/K7fYGcx8h#cpp #programming
@codewiz Modern solutions require modern bugs
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!