What does the unary plus operator do?
Unary plus was present in C, where it did absolutely nothing (much like the auto keyword). In order to not have it, Stroustrup would have had to introduce a gratuitous incompatibility with C. Once it was in C++, it was natural to allow an overload function, just like unary minus, and Stroustrup might have introduced it for that reason if it wasn’t already there. So, it means nothing. It can be used as as sort of decoration to make things look more symmetrical, using +1.5 as the opposite to -1.5 for example. In C++, it can be overloaded, but it’s going to be confusing if operator+() does anything. Remember the standard rule: when overloading arithmetic operators, do things like the ints do. If you’re looking for a reason why it’s there, find something about the early history of C. I suspect there was no good reason, as C was not really designed. Consider the useless auto keyword (presumably in contrast to static, now being recycled in C++0x), and the entry keyword, which never did anyth