Relying on features that are not part of the configured C++ standard leads to non-portable builds and fragile code. Some toolchains accept such
code as extensions or for backward compatibility, while others strictly reject it under the same standard setting. This rule flags:
- Uses of features from future C++ standards (compared to the configured standard).
- Uses of features removed in the configured C++ standard.
- Uses of C-only constructs that some C++ implementations accept as extensions.
Keeping code within the configured standard ensures consistency across compilers and prevents accidental lock-in to permissive extensions. Check
the list of related rules for focused rules that report specific compiler extension cases; S8216 covers remaining standard violations not
addressed by these specialized rules.
This version primarily reports extensions starting from C++20 and later. For example, it does not yet report use of a C++17-only feature when the
configured standard is C++14. This limitation is temporary and will be addressed in a future update.