Mark string_view::to_string as const. Fixes PR21428

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@221101 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2014-11-02 15:35:32 +00:00
parent 3be7f19317
commit 26aa8c9254
2 changed files with 6 additions and 5 deletions

View File

@@ -349,7 +349,8 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS
template<class _Allocator = allocator<_CharT> >
_LIBCPP_INLINE_VISIBILITY
basic_string<_CharT, _Traits, _Allocator> to_string( const _Allocator& __a = _Allocator())
basic_string<_CharT, _Traits, _Allocator>
to_string( const _Allocator& __a = _Allocator()) const
{ return basic_string<_CharT, _Traits, _Allocator> ( begin(), end(), __a ); }
size_type copy(_CharT* __s, size_type __n, size_type __pos = 0) const