C++ is it possible to overload the unary minus operator of an rvalue reference?
is it possible to discern between these two methods? should one not mutate an rvalue when in this case seems perfectly reusable? TYPE a; TYPE b = -a; // unary operator- of a TYPE& aka lvalue ref TYPE c = -(a+b); // unary operator- of a TYPE&& aka rvalue ref Answer You can use reference … Read more