summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libcxx/include/experimental/string_view5
1 files changed, 1 insertions, 4 deletions
diff --git a/libcxx/include/experimental/string_view b/libcxx/include/experimental/string_view
index b8d061fb915..2a20d7caa68 100644
--- a/libcxx/include/experimental/string_view
+++ b/libcxx/include/experimental/string_view
@@ -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
OpenPOWER on IntegriCloud