mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 01:18:52 +08:00
Mark __clear_and_shrink() as noexcept. This prevents the generation of a catch block and call to terminate in string's move assignment. Thanks to Howard for the 'catch'.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@333435 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1259,7 +1259,7 @@ public:
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY bool __invariants() const;
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY void __clear_and_shrink();
|
||||
_LIBCPP_INLINE_VISIBILITY void __clear_and_shrink() _NOEXCEPT;
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
bool __is_long() const _NOEXCEPT
|
||||
@@ -3585,7 +3585,7 @@ basic_string<_CharT, _Traits, _Allocator>::__invariants() const
|
||||
template<class _CharT, class _Traits, class _Allocator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
basic_string<_CharT, _Traits, _Allocator>::__clear_and_shrink()
|
||||
basic_string<_CharT, _Traits, _Allocator>::__clear_and_shrink() _NOEXCEPT
|
||||
{
|
||||
clear();
|
||||
if(__is_long())
|
||||
|
Reference in New Issue
Block a user