From c8453d39d1d98ddafd15267d9d55223cdc48f2b1 Mon Sep 17 00:00:00 2001 From: nathanruiz Date: Wed, 24 Jun 2020 07:52:28 +1000 Subject: [PATCH] Delete nullptr Json::Value constructor (#1194) This patch adds an explicit ctor with a std::nullptr_t argument, that is `delete`-d. This keeps Json::Value from exposing a coding error when automatically promoted to a const char* type. --- include/json/value.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/json/value.h b/include/json/value.h index dffc51a..df1eba6 100644 --- a/include/json/value.h +++ b/include/json/value.h @@ -342,6 +342,7 @@ public: Value(const StaticString& value); Value(const String& value); Value(bool value); + Value(std::nullptr_t ptr) = delete; Value(const Value& other); Value(Value&& other); ~Value();