From 46c70fe2e58007e44f1983e6d9420d4bcc924cad Mon Sep 17 00:00:00 2001 From: Herb Sutter Date: Thu, 9 May 2024 12:44:11 -0700 Subject: [PATCH] Make exception safety `new` notes consistent, and mention that problem was fixed in C++17 Closes #2197 --- CppCoreGuidelines.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index e541548..ff283fd 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -9884,6 +9884,7 @@ This is more efficient: `make_shared` gives a more concise statement of the construction. It also gives an opportunity to eliminate a separate allocation for the reference counts, by placing the `shared_ptr`'s use counts next to its object. +It also ensures exception safety in complex expressions (in pre-C++17 code). ##### Example @@ -9903,7 +9904,7 @@ The `make_shared()` version mentions `X` only once, so it is usually shorter (as ##### Reason `make_unique` gives a more concise statement of the construction. -It also ensures exception safety in complex expressions. +It also ensures exception safety in complex expressions (in pre-C++17 code). ##### Example