mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Help/dev: Note cm::unreachable and CM_UNREACHABLE
Encourage this pattern throughout our sources for optimization and consistent style.
This commit is contained in:
@@ -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/type_traits>``:
|
||||
``cm::is_scoped_enum``
|
||||
|
||||
* ``<cm/utility>``:
|
||||
``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:
|
||||
|
||||
Reference in New Issue
Block a user