8 Sep
2020
8 Sep
'20
9:36 p.m.
Andrey Semashev wrote:
I noticed a few missing operators: unary +, ++, --, <<, >>, <=>, =, <op>=. Also, unary &, but I'm not sure it's a good idea to add one. I realize that there are no functional objects for those, but the library could define them. Do you plan to add them?
I think that << and >> almost certainly belong there, and I was kind of surprised that <functional> doesn't define function objects for them. Next in line would be unary plus. I'm less sure about the various op-assignments and ++/--. At the moment I'd be inclined to skip them. And of course op= is impossible to add because it must be a member. As for <=>, I admit I haven't considered it at all. I haven't yet updated my thinking to C++20.