2 ms·
My main point is that there is no way for something like "2 + object" to do the right thing when member-function syntax is expected, whereas there is at least a
by makecheck 11y ago
My main point is that there is no way for something like "2 + object" to do the right thing when member-function syntax is expected, whereas there is at least a way for a free function to do so; and the language could have avoided this problem.
I believe this is also the entire reason that recent C++ standards introduced free-function forms of things like begin(thing)/end(thing)/etc. because it was just too hard for something like a template to operate on a value when it couldn't tell whether or not object syntax would work.