mirror of
https://github.com/Tencent/rapidjson.git
synced 2025-03-09 11:09:32 +01:00
GenericStringRef: disallow assignment, const string pointer
This commit is contained in:
parent
8bbf41f7c7
commit
ed9cdbc2f7
@ -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<SizeType N>
|
||||
GenericStringRef(CharType (&str)[N]) /* = delete */;
|
||||
|
Loading…
x
Reference in New Issue
Block a user