Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/miloyip/rapidjson.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilo Yip <miloyip@gmail.com>2016-04-05 19:34:45 +0300
committerMilo Yip <miloyip@gmail.com>2016-04-05 19:34:45 +0300
commitbe5a886f8fedf6f963d277bba32e57ae6d232d76 (patch)
treecb4bad8507f0773465e6b34cf9ed22061e13ffe2 /include/rapidjson/document.h
parent689be10891d4ab03853edda4f08db74e7d83e8e0 (diff)
Fix clang compilation error
Diffstat (limited to 'include/rapidjson/document.h')
-rw-r--r--include/rapidjson/document.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h
index dda799c1..2d9bfe6d 100644
--- a/include/rapidjson/document.h
+++ b/include/rapidjson/document.h
@@ -312,6 +312,10 @@ struct GenericStringRef {
GenericStringRef(const CharType* str, SizeType len)
: s(str), length(len) { RAPIDJSON_ASSERT(s != 0); }
+ GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {}
+
+ GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
+
//! implicit conversion to plain CharType pointer
operator const Ch *() const { return s; }
@@ -322,8 +326,6 @@ private:
//! Disallow construction from non-const array
template<SizeType N>
GenericStringRef(CharType (&str)[N]) /* = delete */;
-
- GenericStringRef& operator=(const GenericStringRef&);
};
//! Mark a character pointer as constant string