On 14/08/14 21:22 +0200, François Dumont wrote:
I am preparing a patch for profile mode so I will submit modification for this mode with this big patch.
btw, François, for profile mode I think we should just do something like this patch. I feel quite strongly that if using Debug Mode or Profile Mode makes your program run out of memory where it wouldn't usually fail, then terminating is reasonable. The point of Profile Mode is not to test abnormal execution of your program because that won't give you useful profile information for the normal case. It's more important for the noexcept specification to be consistent across normal/debug/profile modes than for profile mode to fail gracefully via bad_alloc in out-of-memory scenarios.
diff --git a/libstdc++-v3/include/profile/unordered_base.h b/libstdc++-v3/include/profile/unordered_base.h index 283f87c..cd9db7e 100644 --- a/libstdc++-v3/include/profile/unordered_base.h +++ b/libstdc++-v3/include/profile/unordered_base.h @@ -154,7 +154,7 @@ namespace __profile using __unique_keys = std::integral_constant<bool, _Unique_keys>; protected: - _Unordered_profile() + _Unordered_profile() noexcept { auto& __uc = _M_conjure(); __profcxx_hashtable_construct(&__uc, __uc.bucket_count()); @@ -162,10 +162,10 @@ namespace __profile } _Unordered_profile(const _Unordered_profile&) : _Unordered_profile() { } - _Unordered_profile(_Unordered_profile&&) + _Unordered_profile(_Unordered_profile&&) noexcept : _Unordered_profile() { } - ~_Unordered_profile() noexcept + ~_Unordered_profile() { auto& __uc = _M_conjure(); __profcxx_hashtable_destruct(&__uc, __uc.bucket_count(), __uc.size());