summaryrefslogtreecommitdiffstats
path: root/libcxx/include/string_view
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/string_view')
-rw-r--r--libcxx/include/string_view5
1 files changed, 2 insertions, 3 deletions
diff --git a/libcxx/include/string_view b/libcxx/include/string_view
index baba4644552..60c0ad00fc9 100644
--- a/libcxx/include/string_view
+++ b/libcxx/include/string_view
@@ -164,7 +164,6 @@ namespace std {
#include <__config>
#include <__string>
-#include <algorithm>
#include <iterator>
#include <__debug>
@@ -320,8 +319,8 @@ public:
{
if (__pos > size())
__throw_out_of_range("string_view::copy");
- size_type __rlen = _VSTD::min( __n, size() - __pos );
- copy_n(begin() + __pos, __rlen, __s );
+ size_type __rlen = _VSTD::min(__n, size() - __pos);
+ _Traits::copy(__s, data() + __pos, __rlen);
return __rlen;
}
OpenPOWER on IntegriCloud