In c++, as far as I know, I believe that a std::string
cannot represent the absence of a value. Therefore, in case of a method returning a pointer to a std::string
such as, std::string *myMethod()
. Does it make sense to check if the return value from myMethod is NULL
?
The use case related to my question is the following: the std::string *method() was automatically created by gsoap stub library from a WSDL file. I do not have access to the WSDL file, hence i cannot change the signature of the method. My c++ application is the client and the server is a java application. Both of these applications communicate via web services