diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2015-02-23 21:12:02 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2015-02-23 21:12:02 +0000 |
commit | 0168d34e238cb928c05309caac4eb4d50e739b0c (patch) | |
tree | 048b1fad481a5cd430fd894735fb54df898eeccc /libcxx | |
parent | 982ea13c793c67488fd2bdf69fe911dfa5ab32f9 (diff) | |
download | bcm5719-llvm-0168d34e238cb928c05309caac4eb4d50e739b0c.tar.gz bcm5719-llvm-0168d34e238cb928c05309caac4eb4d50e739b0c.zip |
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
Diffstat (limited to 'libcxx')
-rw-r--r-- | libcxx/include/experimental/string_view | 5 |
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 |