3 ms·
Value 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 des
by jeffreygoesto 3y ago
Value 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.