diff options
Diffstat (limited to 'src/string.cpp')
-rw-r--r-- | src/string.cpp | 16 |
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. |