aboutsummaryrefslogtreecommitdiff
path: root/src/string.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/string.cpp')
-rw-r--r--src/string.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/string.cpp b/src/string.cpp
index 5c04c8e..930e77d 100644
--- a/src/string.cpp
+++ b/src/string.cpp
@@ -337,6 +337,22 @@ string& string::append(const string& str)
return *this;
}
+// Specialization to append from other strings' iterators.
+template<>
+string& string::append<__wrapper_iterator<const char *,string> >(
+ __wrapper_iterator<const char *,string> first,
+ __wrapper_iterator<const char *,string> last) {
+ Append(&*first, std::distance(first, last));
+ return *this;
+}
+template<>
+string& string::append<__wrapper_iterator<char *,string> >(
+ __wrapper_iterator<char *,string> first,
+ __wrapper_iterator<char *,string> last) {
+ Append(&*first, std::distance(first, last));
+ return *this;
+}
+
void string::push_back(const char c)
{
// Check we don't overflow.