From 6b0db35db750b7f1008ff5b73e49bef603a50e75 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Sat, 1 Oct 2011 01:57:46 +1000 Subject: [PATCH] Add type operator for bool class --- json.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/json.hpp b/json.hpp index c4e30bbe..bbf2e774 100644 --- a/json.hpp +++ b/json.hpp @@ -190,6 +190,7 @@ namespace json { virtual bool operator==(const node &rhs) const { return rhs == *this; } + operator bool (void) const { return m_value; } bool native (void) const { return m_value; } virtual std::ostream& print (std::ostream &os) const;