We have:
std::plus
(+
)std::minus
(-
)std::multiplies
(*
)
new
does not have a functor per say, but the default allocator does simply pass along the request to new
. This also covers delete
, since the two are linked.
From there, I don't think the functors are really meant to be considered "things you pass to for_each
, but rather "things you might need to specialize on a case by case basis."
Removing new
[and family] from the list, and you basically have a bunch of operations that have no real meaning except as specified by the language. If you take an object's address, there's really only one thing you want to happen: you get given that object's address. How might change, but what doesn't. So there's never really a need to specialize that behavior via a standard functor; you can just use &
and trust operator overloading to do its thing. But the meaning of "add" or "compare" might change over the course of a program, so providing a means to do so has some merit.
This also includes the compound assignment operators; their meaning is linked to their two pieces, so if you need std::add_assign
you can just fall back on std::add
[and operator =
, which is absent from your list].
The bitwise operators kind of fall in between; I could see the argument either way for them.