[Solved] What does =+ mean in c++ [duplicate]


 s2=+s1

Means merely nothing more than applying the unary operator+() to the rvalue provided with the operator=()‘s parameter.

That boils down to the same statement as

s2 = (+s1);

There’s no combined operator like operator+=() for that.

That would have no effect at all, unless these operator functions are overloaded for specific (non primitive) types.

6

solved What does =+ mean in c++ [duplicate]