I\'m defining a ReturnValue class in C++ that needs to report whether a method was successful. I want objects of the class to evaluate to true on s
ReturnValue
true
Well, you could overload operator bool():
operator bool()
class ReturnValue { operator bool() const { return true; // Or false! } };