3 ms·
Upgrading the compiler: undefined behaviour uncovered
- jeffreygoesto 3y agoValue init can also bite you when there is a big performance difference between "zero all the PODs" and "set a valid flag to false". Also when zero is not a desirable or valid initial value. I tend to like an explicit default c'tor visible at the struct scope or inline init better for a case like the described one than using curly braces at the instance generation.