r/cpp • • Oct 15 '26

Barry's C++ Blog - Generating Operator Functions

https://brevzin.github.io/c++/2026/10/14/push-vs-pull-ii/
77 Upvotes

7 comments sorted by

View all comments

6

u/chengfeng-xie Oct 15 '26

And since here we’re injecting operator== and operator!= as member functions, we don’t have this issue with being able to find our operators. They’re always there.

The code above this text actually injects friend functions, so calling them member functions could be misleading from a terminology standpoint.