3 ms·
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
by shultays 10y ago
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
- pjmlp 10y agoIt 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.