From fe9bed2189c5a4c967462b1d4801ae9507228869 Mon Sep 17 00:00:00 2001 From: bgloyer <36457894+bgloyer@users.noreply.github.com> Date: Tue, 18 Mar 2025 22:12:25 -0700 Subject: [PATCH 1/2] F.6 noexcept --- CppCoreGuidelines.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 2819f9e43..e7aa6320e 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -2740,9 +2740,13 @@ low-level functions. Destructors, `swap` functions, move operations, and default constructors should never throw. See also [C.44](#Rc-default00). +##### Note + +Care must be taken on base virtual functions and functions part of a public interface because declaring a function `noexcept` is establishing a guarantee that all current and future implementations must abide by. For virtual function, all overriders must also be `noexcept` and removing `noexcept` from a function could break calling functions. + ##### Enforcement -* Flag functions that are not `noexcept`, yet cannot throw. +* (hard) Flag low-level functions that are not `noexcept`, yet cannot throw. * Flag throwing `swap`, `move`, destructors, and default constructors. ### F.7: For general use, take `T*` or `T&` arguments rather than smart pointers From 90ed30acf958d48e4e9e5578de06f7f5c9af70b1 Mon Sep 17 00:00:00 2001 From: bgloyer <36457894+bgloyer@users.noreply.github.com> Date: Tue, 18 Mar 2025 22:36:34 -0700 Subject: [PATCH 2/2] add overriders to isocpp.dic --- scripts/hunspell/isocpp.dic | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/hunspell/isocpp.dic b/scripts/hunspell/isocpp.dic index efe8fae83..3830447e6 100644 --- a/scripts/hunspell/isocpp.dic +++ b/scripts/hunspell/isocpp.dic @@ -400,6 +400,7 @@ overabstract overconstrain overconstrained overridable +overriders p1 p2 p3