commit | 9079422ac11314e7f6485ac35e8d66c5bdaad4ba | [log] [tgz] |
---|---|---|
author | Wolfram Rösler <wolfram@roesler-ac.de> | Tue Dec 05 18:18:55 2017 +0100 |
committer | Christopher Dunn <cdunn2001@gmail.com> | Tue Dec 05 11:18:55 2017 -0600 |
tree | 6b3ac224b17171ac484732a1baffffff39a83d9b | |
parent | c39aa295e4935d71ff3b420ad24d8f75f3b84e97 [diff] [blame] |
Allow Json::Value to be used in a boolean context (#695) Must bump soversion too.
diff --git a/include/json/value.h b/include/json/value.h index be40c30..67d0333 100644 --- a/include/json/value.h +++ b/include/json/value.h
@@ -400,8 +400,8 @@ /// otherwise, false. bool empty() const; - /// Return isNull() - bool operator!() const; + /// Return !isNull() + explicit operator bool() const; /// Remove all object members and array elements. /// \pre type() is arrayValue, objectValue, or nullValue