Skip to content

Commit

Permalink
Making comparison operators const.
Browse files Browse the repository at this point in the history
  • Loading branch information
Type1J committed May 11, 2017
1 parent 00d841b commit b78457b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7897,14 +7897,14 @@ class basic_json

/// equal operator (calls key())
template<typename KeyType>
bool operator==(const KeyType& key)
bool operator==(const KeyType& key) const
{
return proxy.key() == key;
}

/// not equal operator (calls key())
template<typename KeyType>
bool operator!=(const KeyType& key)
bool operator!=(const KeyType& key) const
{
return proxy.key() != key;
}
Expand All @@ -7930,14 +7930,14 @@ class basic_json

/// equal operator (calls value())
template<typename ValueType>
bool operator==(const ValueType& value)
bool operator==(const ValueType& value) const
{
return proxy.value() == value;
}

/// not equal operator (calls value())
template<typename ValueType>
bool operator!=(const ValueType& value)
bool operator!=(const ValueType& value) const
{
return proxy.value() != value;
}
Expand Down

0 comments on commit b78457b

Please sign in to comment.