Skip to content

Commit

Permalink
Make exception safety new notes consistent, and mention that proble…
Browse files Browse the repository at this point in the history
…m was fixed in C++17

Closes #2197
  • Loading branch information
hsutter committed May 9, 2024
1 parent 9656da8 commit 46c70fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CppCoreGuidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down

0 comments on commit 46c70fe

Please sign in to comment.