3 ms·
I just fixed a segfault the other day because one of our new hires fresh from college is eager on using modern c++ and didn't put parentheses at the correct pla
by eska 6y ago
I just fixed a segfault the other day because one of our new hires fresh from college is eager on using modern c++ and didn't put parentheses at the correct place in his fold expression.
- HelloNurse 6y agoIt sounds like an interesting bug, can you elaborate? On the surface it sounds like your new hire merely used fold expressions to call functions and operators that were already treacherous on their own.
- eska 6y agoSorry, I can't look it up right now, but trying to reconstruct it in my head it must've been something like y = (f(x1), f(x2), f(x3)) vs y = f(x1, x2, x3) Not entirely sure anymore though. But it was something about causing side effects but throwing away return values with the ,-operator and involved function calls, I think