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
|
//! implicit conversion to plain CharType pointer
|
||||||
operator const Ch *() const { return s; }
|
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)
|
const SizeType length; //!< length of the string (excluding the trailing NULL terminator)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
//! Disallow copy-assignment
|
||||||
|
GenericStringRef operator=(const GenericStringRef&);
|
||||||
//! Disallow construction from non-const array
|
//! Disallow construction from non-const array
|
||||||
template<SizeType N>
|
template<SizeType N>
|
||||||
GenericStringRef(CharType (&str)[N]) /* = delete */;
|
GenericStringRef(CharType (&str)[N]) /* = delete */;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user