From b78457b792501803eadb7b48e04178a1ec570b1e Mon Sep 17 00:00:00 2001 From: Jay Sistar Date: Thu, 11 May 2017 13:22:47 -0400 Subject: [PATCH] Making comparison operators const. --- src/json.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/json.hpp b/src/json.hpp index b799f63bb..6e5803ca2 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -7897,14 +7897,14 @@ class basic_json /// equal operator (calls key()) template - bool operator==(const KeyType& key) + bool operator==(const KeyType& key) const { return proxy.key() == key; } /// not equal operator (calls key()) template - bool operator!=(const KeyType& key) + bool operator!=(const KeyType& key) const { return proxy.key() != key; } @@ -7930,14 +7930,14 @@ class basic_json /// equal operator (calls value()) template - bool operator==(const ValueType& value) + bool operator==(const ValueType& value) const { return proxy.value() == value; } /// not equal operator (calls value()) template - bool operator!=(const ValueType& value) + bool operator!=(const ValueType& value) const { return proxy.value() != value; }