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.

llvm-svn: 230260
This commit is contained in:
Marshall Clow 2015-02-23 21:12:02 +00:00
parent 982ea13c79
commit 0168d34e23

View File

@ -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