[libcxx] r230260 - 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.
Marshall Clow
mclow.lists at gmail.com
Mon Feb 23 13:12:03 PST 2015
Author: marshall
Date: Mon Feb 23 15:12:02 2015
New Revision: 230260
URL: http://llvm.org/viewvc/llvm-project?rev=230260&view=rev
Log:
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.
Modified:
libcxx/trunk/include/experimental/string_view
Modified: libcxx/trunk/include/experimental/string_view
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/experimental/string_view?rev=230260&r1=230259&r2=230260&view=diff
==============================================================================
--- libcxx/trunk/include/experimental/string_view (original)
+++ libcxx/trunk/include/experimental/string_view Mon Feb 23 15:12:02 2015
@@ -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
More information about the cfe-commits
mailing list