What does the unary plus operator do?
问题 What does the unary plus operator do? There are several definitions that I have found (here and here) but I still have no idea what it would be used for. It seems like it doesn\'t do anything but there has be a reason for it, right? 回答1: It's there to be overloaded if you feel the need; for all predefined types it's essentially a no-op. The practical uses of a no-op unary arithmetic operator are pretty limited, and tend to relate to the consequences of using a value in an arithmetic