From edb4bdb7ec104b055b17490ed2a6497b72c96ae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christof=20Kr=C3=BCger?= Date: Fri, 12 Jan 2018 21:35:17 +0100 Subject: [PATCH] Do not deprecate whole class but only constructors of Json::Reader. This should fix warning C4996 issued by Visual Studio in cases where Json::Reader is not even used by client code. --- include/json/reader.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/json/reader.h b/include/json/reader.h index 82859fd..dc1da1f 100644 --- a/include/json/reader.h +++ b/include/json/reader.h @@ -32,7 +32,7 @@ namespace Json { * * \deprecated Use CharReader and CharReaderBuilder. */ -class JSONCPP_DEPRECATED("Use CharReader and CharReaderBuilder instead") JSON_API Reader { +class JSON_API Reader { public: typedef char Char; typedef const Char* Location; @@ -52,11 +52,13 @@ public: /** \brief Constructs a Reader allowing all features * for parsing. */ + JSONCPP_DEPRECATED("Use CharReader and CharReaderBuilder instead") Reader(); /** \brief Constructs a Reader allowing the specified feature set * for parsing. */ + JSONCPP_DEPRECATED("Use CharReader and CharReaderBuilder instead") Reader(const Features& features); /** \brief Read a Value from a JSON