diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h index 44cf532..33c97f4 100644 --- a/include/rapidjson/document.h +++ b/include/rapidjson/document.h @@ -270,10 +270,12 @@ struct GenericStringRef { //! implicit conversion to plain CharType pointer operator const Ch *() const { return s; } - const Ch* s; //!< plain CharType pointer + const Ch* const s; //!< plain CharType pointer const SizeType length; //!< length of the string (excluding the trailing NULL terminator) private: + //! Disallow copy-assignment + GenericStringRef operator=(const GenericStringRef&); //! Disallow construction from non-const array template GenericStringRef(CharType (&str)[N]) /* = delete */;