From 09ded3a354c21d4eba9cbc38fdf6327eaa720d24 Mon Sep 17 00:00:00 2001 From: Tyler Yankee Date: Sun, 23 Aug 2026 13:36:01 -0400 Subject: [PATCH] Help/dev: Note cm::unreachable and CM_UNREACHABLE Encourage this pattern throughout our sources for optimization and consistent style. --- Help/dev/source.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Help/dev/source.rst b/Help/dev/source.rst index 1144ee289b..abb26a73c5 100644 --- a/Help/dev/source.rst +++ b/Help/dev/source.rst @@ -50,6 +50,9 @@ follow (which are not enforced by other tooling): * Lambdas: ``auto f = []() {...};`` +* Use ``CM_UNREACHABLE`` for logically unreachable code paths instead of + ad-hoc ``assert(false ...)`` statements or comment-only placeholders. + C++ Subset Permitted ==================== @@ -235,6 +238,9 @@ Available features are: * ````: ``cm::is_scoped_enum`` + * ````: + ``cm::unreachable`` + Additionally, some useful non-standard extensions to the C++ standard library are available in headers under the directory ``cmext/`` in namespace ``cm``. These are: