json/tree: add std::string/string equality ops
This commit is contained in:
parent
1d0240ba10
commit
f73b39f063
@ -668,6 +668,11 @@ json::tree::string::operator== (const char *rhs) const
|
||||
{ return rhs == m_value; }
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
json::tree::string::operator== (const std::string &rhs) const
|
||||
{ return rhs == m_value; }
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Number
|
||||
|
||||
|
@ -211,9 +211,12 @@ namespace json { namespace tree {
|
||||
|
||||
virtual bool operator==(const char *rhs) const;
|
||||
virtual bool operator==(const string &rhs) const;
|
||||
virtual bool operator==(const std::string &rhs) const;
|
||||
virtual bool operator==(const node &rhs) const
|
||||
{ return rhs == *this; }
|
||||
|
||||
virtual bool operator!= (const std::string &rhs) const { return !(*this == rhs); }
|
||||
|
||||
virtual size_t size (void) const { return m_value.size (); }
|
||||
|
||||
operator const std::string&(void) const { return m_value; }
|
||||
|
Loading…
Reference in New Issue
Block a user