Making comparison operators const.
This commit is contained in:
parent
00d841bfda
commit
b78457b792
1 changed files with 4 additions and 4 deletions
|
@ -7897,14 +7897,14 @@ class basic_json
|
||||||
|
|
||||||
/// equal operator (calls key())
|
/// equal operator (calls key())
|
||||||
template<typename KeyType>
|
template<typename KeyType>
|
||||||
bool operator==(const KeyType& key)
|
bool operator==(const KeyType& key) const
|
||||||
{
|
{
|
||||||
return proxy.key() == key;
|
return proxy.key() == key;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// not equal operator (calls key())
|
/// not equal operator (calls key())
|
||||||
template<typename KeyType>
|
template<typename KeyType>
|
||||||
bool operator!=(const KeyType& key)
|
bool operator!=(const KeyType& key) const
|
||||||
{
|
{
|
||||||
return proxy.key() != key;
|
return proxy.key() != key;
|
||||||
}
|
}
|
||||||
|
@ -7930,14 +7930,14 @@ class basic_json
|
||||||
|
|
||||||
/// equal operator (calls value())
|
/// equal operator (calls value())
|
||||||
template<typename ValueType>
|
template<typename ValueType>
|
||||||
bool operator==(const ValueType& value)
|
bool operator==(const ValueType& value) const
|
||||||
{
|
{
|
||||||
return proxy.value() == value;
|
return proxy.value() == value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// not equal operator (calls value())
|
/// not equal operator (calls value())
|
||||||
template<typename ValueType>
|
template<typename ValueType>
|
||||||
bool operator!=(const ValueType& value)
|
bool operator!=(const ValueType& value) const
|
||||||
{
|
{
|
||||||
return proxy.value() != value;
|
return proxy.value() != value;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue