summaryrefslogtreecommitdiffstats
path: root/libcxx/include/string_view
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2019-03-19 03:30:07 +0000
committerMarshall Clow <mclow.lists@gmail.com>2019-03-19 03:30:07 +0000
commit9ea0e473f0b96455b918eefcf8fc535638674a1f (patch)
tree7d4d56a0ab1298b8cd8b065695ff2b9d6b06582f /libcxx/include/string_view
parent89251edefcb46f0b5e0caf2bb47f38d115e12fa4 (diff)
downloadbcm5719-llvm-9ea0e473f0b96455b918eefcf8fc535638674a1f.tar.gz
bcm5719-llvm-9ea0e473f0b96455b918eefcf8fc535638674a1f.zip
Mark 'front()' and 'back()' as noexcept for array/deque/string/string_view. These are just rebranded 'operator[]', and should be noexcept like it is.
llvm-svn: 356435
Diffstat (limited to 'libcxx/include/string_view')
-rw-r--r--libcxx/include/string_view4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/include/string_view b/libcxx/include/string_view
index 79565c245d8..9a6eb0c2373 100644
--- a/libcxx/include/string_view
+++ b/libcxx/include/string_view
@@ -288,13 +288,13 @@ public:
}
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
- const_reference front() const
+ const_reference front() const _NOEXCEPT
{
return _LIBCPP_ASSERT(!empty(), "string_view::front(): string is empty"), __data[0];
}
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
- const_reference back() const
+ const_reference back() const _NOEXCEPT
{
return _LIBCPP_ASSERT(!empty(), "string_view::back(): string is empty"), __data[__size-1];
}
OpenPOWER on IntegriCloud