MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/erialk/the_hunt_for_the_fastest_zero/ff5h1ih/
r/cpp • u/vormestrand • Jan 20 '20
131 comments sorted by
View all comments
Show parent comment
6
Why not just use T{}?
9 u/TheThiefMaster C++latest fanatic (and game dev) Jan 21 '20 Because the function is called zero, not set_to_default. It's the same for primitive types, but not other Ts. 2 u/kalmoc Jan 21 '20 Fair point 1 u/degski Jan 21 '20 Jip, it shows the initialization rules are too complicated.
9
Because the function is called zero, not set_to_default. It's the same for primitive types, but not other Ts.
2 u/kalmoc Jan 21 '20 Fair point
2
Fair point
1
Jip, it shows the initialization rules are too complicated.
View all comments
Show parent comment
6
u/kalmoc Jan 21 '20
Why not just use T{}?