File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7894,6 +7894,20 @@ class basic_json
78947894 {
78957895 return proxy.key ();
78967896 }
7897+
7898+ // / equal operator (calls key())
7899+ template <typename KeyType>
7900+ bool operator ==(const KeyType& key) const
7901+ {
7902+ return proxy.key () == key;
7903+ }
7904+
7905+ // / not equal operator (calls key())
7906+ template <typename KeyType>
7907+ bool operator !=(const KeyType& key) const
7908+ {
7909+ return proxy.key () != key;
7910+ }
78977911 };
78987912
78997913 // / helper class for second "property"
@@ -7913,6 +7927,28 @@ class basic_json
79137927 {
79147928 return proxy.value ();
79157929 }
7930+
7931+ // / equal operator (calls value())
7932+ template <typename ValueType>
7933+ bool operator ==(const ValueType& value) const
7934+ {
7935+ return proxy.value () == value;
7936+ }
7937+
7938+ // / not equal operator (calls value())
7939+ template <typename ValueType>
7940+ bool operator !=(const ValueType& value) const
7941+ {
7942+ return proxy.value () != value;
7943+ }
7944+
7945+ // / assignment operator (calls value())
7946+ template <typename ValueType>
7947+ iterator_value_property<ProxyType>& operator =(const ValueType& value)
7948+ {
7949+ proxy.value () = value;
7950+ return *this ;
7951+ }
79167952 };
79177953
79187954 // / helper class for iteration
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ add_executable(${JSON_UNITTEST_TARGET_NAME}
3030 "src/unit-element_access2.cpp"
3131 "src/unit-inspection.cpp"
3232 "src/unit-iterator_wrapper.cpp"
33+ "src/unit-iterator_wrapper_first_second.cpp"
3334 "src/unit-iterators1.cpp"
3435 "src/unit-iterators2.cpp"
3536 "src/unit-json_patch.cpp"
You can’t perform that action at this time.
0 commit comments