Skip to content

Commit

Permalink
Take XmlRpcValue by *const* ref. in operator<<
Browse files Browse the repository at this point in the history
This allows to use the operator<< also with const references to
XmlRpcValue objects, not only non-const ones.
  • Loading branch information
efernandez committed Mar 16, 2018
1 parent 94aaaec commit 8a14ab8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion utilities/xmlrpcpp/include/xmlrpcpp/XmlRpcValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ namespace XmlRpc {
} // namespace XmlRpc


std::ostream& operator<<(std::ostream& os, XmlRpc::XmlRpcValue& v);
std::ostream& operator<<(std::ostream& os, const XmlRpc::XmlRpcValue& v);


#endif // _XMLRPCVALUE_H_
6 changes: 3 additions & 3 deletions utilities/xmlrpcpp/src/XmlRpcValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -653,10 +653,10 @@ namespace XmlRpc {


// ostream
std::ostream& operator<<(std::ostream& os, XmlRpc::XmlRpcValue& v)
{
std::ostream& operator<<(std::ostream& os, const XmlRpc::XmlRpcValue& v)
{
// If you want to output in xml format:
//return os << v.toXml();
//return os << v.toXml();
return v.write(os);
}

0 comments on commit 8a14ab8

Please sign in to comment.