GenericStringRef: disallow assignment, const string pointer

This commit is contained in:
Philipp A. Hartmann 2014-07-07 11:26:19 +02:00
parent 8bbf41f7c7
commit ed9cdbc2f7

View File

@ -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 */;