Add char* equality for json::strings
This commit is contained in:
parent
89fb2b238c
commit
598f125d53
@ -511,6 +511,11 @@ json::string::operator ==(const json::string &rhs) const
|
|||||||
{ return rhs.m_value == m_value; }
|
{ return rhs.m_value == m_value; }
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
json::string::operator ==(const char *rhs) const
|
||||||
|
{ return rhs == m_value; }
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Number
|
// Number
|
||||||
//
|
//
|
||||||
|
1
json.hpp
1
json.hpp
@ -167,6 +167,7 @@ namespace json {
|
|||||||
|
|
||||||
virtual const string& as_string (void) const { return *this; }
|
virtual const string& as_string (void) const { return *this; }
|
||||||
virtual bool is_string (void) const { return true; }
|
virtual bool is_string (void) const { return true; }
|
||||||
|
virtual bool operator==(const char *rhs) const;
|
||||||
virtual bool operator==(const string &rhs) const;
|
virtual bool operator==(const string &rhs) const;
|
||||||
virtual bool operator==(const node &rhs) const
|
virtual bool operator==(const node &rhs) const
|
||||||
{ return rhs == *this; }
|
{ return rhs == *this; }
|
||||||
|
Loading…
Reference in New Issue
Block a user