C++17 Language Elements Supported in Polyspace
This table provides a partial list of C++ language elements that have been introduced since C++17 and its corresponding Polyspace® support. If your code contains nonsupported constructions, Polyspace reports a compilation error.
C++17 Std Ref | Description | Supported |
---|---|---|
C++2017-N3921 | std::string-view : Observe the content of an
std::string object without owning the
resource | Yes |
C++2017-N3922 |
| Yes |
C++2017-N3928 | The static_assert declaration no longer requires a
second argument. Invoking static_assert with no
message is now allowed: static_assert(N >
0); | Yes |
C++2017-N4051 | C++ has templates that are not template <template <typename> typename Tmpl> struct X; | Yes |
C++2017-N4086 | Starting in C++17, trigraphs are no longer supported. | No |
C++2017-N4230 | Starting in C++17, use a qualified name in a namespace definition to define several nested namespaces at once. For instance, these code snippets are equivalent:
| Yes |
C++2017-N4259 | The function std::uncaught_exceptions is
introduced in C++17, which returns the number of exceptions in your code
that are not handled. The function
std:uncaught_exception , which returns a Boolean
value, is deprecated. | Yes |
C++2017-N4266 | Starting in C++17, namespaces and enumerators can be annotated with attributes to allows clearer communication of developer intention. | Yes |
C++2017-N4267 | Starting in C++17, the prefix u8 is supported.
This prefix creates a UTF-8 character literal. The value of the UTF-8
character literal is equal to its ISO 10646 code point value if the code
point value is in the C0 Controls and Basic Latin Unicode block. | Yes |
C++2017-N4268 | Allow constant evaluation of nontype template arguments. | Yes |
C++2017-N4295 | Allow fold expressions | Yes |
C++2017-N4508 | Allow untimed std::shared_mutex
| The use of std::shared_mutex does not cause a
compilation error. Polyspace does not support sharing mutex objects by using
std::shared_mutex . |
C++2017-P0001R1 | Remove the use of the register keyword | Yes |
C++2017-P0002R1 | Remove operator++(bool)
| Yes |
C++2017-P0003R5 | Remove deprecated exception specifications by using
throw(<>)
| Bug Finder removes the exception specification specified by using
throw() statements. Code Prover raises a
compilation error when throw() statements are present
in C++17 code. |
C++2017-P0012R1 | Make exception specifications part of the type system | Yes |
C++2017-P0017R1 | Aggregate initialization of classes with base classes | Yes |
C++2017-P0018R3 | Allow capturing the pointer *this in Lambda
expressions | Yes |
C++2017-P0024R2 | Standardization of the C++ technical specification for Extension for Parallelism | Polyspace supports this feature when you use the Visual 15.x and Intel C++ 18.0 compilers. |
C++2017-P002842 | Using attribute namespaces without repetition | Yes |
C++2017-P0035R4 | Dynamic memory allocation for over-aligned data | Yes |
C++2017-P0036R0 | Unary fold expressions and empty parameter packs | Yes |
C++2017-P0061R1 | Use of __has_include in preprocessor conditionals | Yes |
C++2017-P0067R5 | Elementary string conversions | No |
C++2017-P0083R3 | Splicing maps and sets | Polyspace supports this feature when the compiler you use also supports this feature. For instance, Polyspace supports this feature when you use g++ as compiler. |
C++2017-P0088R3 | std::variant | Partially supported. |
C++2017-P0091R3 | Template argument deduction for class templates | Partially supported. |
C++2017-P0127R2 | Non-type template parameters that have auto type | Yes |
C++2017-P0135R1 | Guaranteed copy elision | Partially supported. |
C++2017-P0136R1 | New specification for inheriting constructors | No |
C++2017-P0137R1 | Replacement of class objects containing reference members | Yes |
C++2017-P0138R2 | Direct-list-initialization of enumerations | Yes |
C++2017-P0145R3 | Stricter expression evaluation order | No new syntax/keyword is introduced and therefore does not affect Polyspace support for C++17. |
C++2017-P0154R1 | Hardware interference size | Supported with Visual Studio Compiler |
C++2017-P0170R1 | constexpr Lambda expressions | Partially supported |
C++2017-P018R0 | Differing begin and end types in range-based for
loops | Yes |
C++2017-P0188R1 | [[fallthrough]] attribute | Yes |
C++2017-P0189R1 | [[nodiscard]] attribute | Yes |
C++2017-P0195R2 | Pack expansions in using-declarations | Yes |
C++2017-P0212R1 | [[maybe_unused]] attribute | Yes |
C++2017-P0217R3 | Structured Bindings | Polyspace does not support binding by using an rvalue. |
C++2017-P0218R1 | std::filesystem | No |
C++2017-P0220R1 | std::any | Yes |
C++2017-P0220R1 | std::optional | Bug Finder supports the syntax. The semantics are partially supported. Code Prover does not support this feature. |
C++2017-P0226R1 | Mathematical special functions | No |
C++2017-P0245R1 | Hexadecimal floating-point literals | Yes |
C++2017-P0283R2 | Ignore unknown attributes | Yes |
C++2017-P0292R2 | constexpr if statements | Yes |
C++2017-P0298R3 | std::byte
| Yes |
C++2017-P0305R1 | init-statements for if and switch | Yes |
C++2017-P0386R2 | Inline variables | No |
C++2017-P0522R0 | Invoke partial ordering to determine when a template template-argument is a valid match for a template-parameter | Partially supported |
See Also
C++ standard version (-cpp-version)