Jonathan Wakely

Results 175 comments of Jonathan Wakely

The constrained algos in namespace `ranges` are not found by ADL so I definitely think it should be qualified as `ranges::for_each(v, ...)`

I think that paper was ~~abandoned and/or rejected~~ never discussed and seems moribund. [P2408](https://wg21.link/p2408) will make many parallel algos usable for views and other ranges.

The example specifically says it's showing how to do it **without** a test, so adding a test to it would break the example. And the rest of the item specifically...

> One more thing that I learnt recently - the introduction of "common utility constants" to comply with this rule can lead to very subtle, undetected ODR violations (which is...

> Clang-tidy has a default allowed list of like `[0, 1, 2, 3, 4, 100]`. Those numbers are often used in 4x4 matrices (size and indexing). Would it make sense...

The calculator example seems like a very bad use of preconditions. The contract should allow larger numbers, check for overflow, and report an error. You say yourself that you want...

If the function to calculate the result has such a precondition, the app needs to validate the inputs *before* calling that function. If you want to handle bad input and...

P.S. I am not stating my position on terminate vs throw (even though I do have an opinion), I am simply saying that the calculator examples are very bad examples...

@RedDwarf69 I agree, but the right way to do contracts in C++ is still an open question. Once there is more clarity I would expect GSL to be updated. That...