Re:C++ for Games: Performance, Allocations and Data Locality
by pjmlp on Monday May 30, 2016 @01:55AM
(#11799800)
In C++ it does, because they are different function calls.
[ Parent
| on HN ]
Re:C++ for Games: Performance, Allocations and Data Locality
by shultays on Monday May 30, 2016 @04:35AM
(#11800272)
If they are overloaded.
Do C++ assumes that i++ and ++i same for overloaded operators?
edit: same if they are same in the case of primitives
Re:C++ for Games: Performance, Allocations and Data Locality
by pjmlp on Monday May 30, 2016 @05:15AM
(#11800398)
It cannot assume that, specially in binary libraries.
You separate overloads need to be provided and the compiler cannot know if the behavior is the same.
I always use the same approach as in pure OOP languages and FP ones, assume everything is a method call.