summaryrefslogtreecommitdiff
path: root/zen/string_base.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:24:09 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:24:09 +0200
commit110fc5dee14fc7988f631a158e50d283446aba7a (patch)
tree7c19dfd3bdb8c4636409ec80a38c70499ac006db /zen/string_base.h
parent5.14 (diff)
downloadFreeFileSync-110fc5dee14fc7988f631a158e50d283446aba7a.tar.gz
FreeFileSync-110fc5dee14fc7988f631a158e50d283446aba7a.tar.bz2
FreeFileSync-110fc5dee14fc7988f631a158e50d283446aba7a.zip
5.15
Diffstat (limited to 'zen/string_base.h')
-rw-r--r--zen/string_base.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/zen/string_base.h b/zen/string_base.h
index e4e21716..e38fab94 100644
--- a/zen/string_base.h
+++ b/zen/string_base.h
@@ -209,6 +209,8 @@ public:
typedef Char& reference;
typedef const Char& const_reference;
typedef Char value_type;
+
+ Zbase(const_iterator first, const_iterator last);
Char* begin();
Char* end ();
const Char* begin() const;
@@ -338,6 +340,17 @@ Zbase<Char, SP, AP>::Zbase(const Char* source, size_t sourceLen)
}
+template <class Char, template <class, class> class SP, class AP>
+Zbase<Char, SP, AP>::Zbase(const_iterator first, const_iterator last)
+{
+ assert(first <= last);
+ const size_t sourceLen = last - first;
+ rawStr = this->create(sourceLen);
+ std::copy(first, last, rawStr);
+ rawStr[sourceLen] = 0;
+}
+
+
template <class Char, template <class, class> class SP, class AP> inline
Zbase<Char, SP, AP>::Zbase(const Zbase<Char, SP, AP>& source)
{
bgstack15