Add json::node equality operators and specialise
This commit is contained in:
parent
036f0fab51
commit
cae41d87fb
@ -323,8 +323,13 @@ json::node::operator!=(const node &rhs) const
|
|||||||
{ return !(*this == rhs); }
|
{ return !(*this == rhs); }
|
||||||
|
|
||||||
|
|
||||||
bool json::node::operator==(const char *rhs) const
|
bool json::node::operator==(const char *rhs) const {
|
||||||
{ return as_string () == rhs; }
|
try {
|
||||||
|
return as_string () == rhs;
|
||||||
|
} catch (const json::type_error&) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const json::node&
|
const json::node&
|
||||||
|
Loading…
Reference in New Issue
Block a user