Skip to content

Commit c8453d3

Browse files
authored
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.
1 parent 632044a commit c8453d3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

include/json/value.h

+1
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ class JSON_API Value {
342342
Value(const StaticString& value);
343343
Value(const String& value);
344344
Value(bool value);
345+
Value(std::nullptr_t ptr) = delete;
345346
Value(const Value& other);
346347
Value(Value&& other);
347348
~Value();

0 commit comments

Comments
 (0)