Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: eliminate needless definitions of std::size (#4652)
Since C++17 defines std::size(C) (defaulting to returning C.size()), we don't need to define our own now that C++17 is our minimum. It seemed harmless to define it anyway for quite a while... but then a few days ago, the GitHub Windows CI runners upgraded their version of MSVS, and we started getting some very odd test failures that I was able to trace to std::size somehow returning the wrong size in some cases, and printf debugging revealed that the one we supplied wasn't even the one being called. I can't say I understand exactly what was going wrong. I was debugging by repeatedly submitting small changes with debugging scaffolding to GH to see how it works in a CI run, since I have no access to a local Windows machine (at about 1/2 hour turnaround time for each iteration!). Once I discovered that not supplying the redundant definition somehow fixes the problem, I couldn't justify spending more of my weekend on this to find out why. "Because MSVS" is a sufficient explanation for a lot of weirdness in the computing world. Signed-off-by: Larry Gritz <lg@larrygritz.com>
- Loading branch information