Change string_view::at to make it work with gcc and VC++. Thanks to K-ballo for the bug report, and Jonathan Wakeley for the code review in the bar.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@230260 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
da1818a08c
commit
14861507bc
@ -280,11 +280,8 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS
|
||||
const_reference at(size_type __pos) const
|
||||
{
|
||||
return __pos >= size()
|
||||
? throw out_of_range("string_view::at")
|
||||
? (throw out_of_range("string_view::at"), __data[0])
|
||||
: __data[__pos];
|
||||
// if (__pos >= size())
|
||||
// throw out_of_range("string_view::at");
|
||||
// return __data[__pos];
|
||||
}
|
||||
|
||||
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
|
||||
|
Loading…
x
Reference in New Issue
Block a user