From 806e40b21413d3f91571409f2f412942252cfabc Mon Sep 17 00:00:00 2001 From: Thibault Kruse Date: Sat, 3 Oct 2015 13:36:46 +0200 Subject: [PATCH] missing indent --- CppCoreGuidelines.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 7cba91a..2f03d5d 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -12981,8 +12981,7 @@ Here, if constructing `copy2` throws, we have the same problem because `i`'s des void test() { std::array arr; // this line can std::terminate(!) - -} + } The behavior of arrays is undefined in the presence of destructors that throw because there is no reasonable rollback behavior that could ever be devised. Just think: What code can the compiler generate for constructing an `arr` where, if the fourth object's constructor throws, the code has to give up and in its cleanup mode tries to call the destructors of the already-constructed objects... and one or more of those destructors throws? There is no satisfactory answer.