basic_string.h (basic_string::basic_string()): Make noexcept conditional on allocator (LWG 2455).

* include/bits/basic_string.h (basic_string::basic_string()): Make
	noexcept conditional on allocator (LWG 2455).

From-SVN: r223160
This commit is contained in:
Jonathan Wakely 2015-05-13 14:32:36 +01:00 committed by Jonathan Wakely
parent d0cad9fef0
commit bcb896abe8
2 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2015-05-13 Jonathan Wakely <jwakely@redhat.com>
* include/bits/basic_string.h (basic_string::basic_string()): Make
noexcept conditional on allocator (LWG 2455).
* include/std/complex (polar): Check for negative rho (LWG 2459).
* include/experimental/tuple (apply): Handle pointers to member (LWG

View File

@ -377,7 +377,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
/**
* @brief Default constructor creates an empty string.
*/
basic_string() _GLIBCXX_NOEXCEPT
basic_string()
#if __cplusplus >= 201103L
noexcept(is_nothrow_default_constructible<_Alloc>::value)
#endif
: _M_dataplus(_M_local_data())
{ _M_set_length(0); }