Main Content

C++14 Language Elements Supported in Polyspace

This table provides a partial list of C++ language elements that have been introduced since C++14 and its corresponding Polyspace® support. If your code contains nonsupported constructions, Polyspace reports a compilation error.

C++14 Std RefDescriptionSupported
C++2014-N3323Implicit conversion from class type in certain contexts such as delete or switch statement.This C++14 feature allows implicit conversion from class type in certain contexts. No new syntax/keyword is introduced and therefore does not affect Polyspace support for C++14.
C++2014-N3462More SFINAE-friendly std::result_ofYes
C++2014-N3472Binary literals, for instance, 0b100.Yes
C++2014-N3545operator() in integral_constant template of constexpr typeYes
C++2014-N3637Relation between std::async and destructor of std::futureNo new syntax/keyword is introduced and therefore does not affect Polyspace support for C++14.
C++2014-N3638Automatic deduction of return type for functions where an explicit return type is not specified

Yes.

In some cases, Code Prover can show compilation errors.

C++2014-N3642Suffixes for user-defined literals indicating time (h, min, s, ms, us, ns) and strings (s)Yes
C++2014-N3648Initialization of captured members in lambda functions

Yes.

In some cases, during initialization, Code Prover can call the corresponding constructors more number of times than necessary.

C++2014-N3649

Generic (polymorphic) lambda expressions:

  • Using auto type-specifier for parameter and return type

  • Conversion of generic capture-less lambda expressions to pointer-to-function.

Yes
C++2014-N3651Variable templatesYes
C++2014-N3652Declarations, conditions and loops in constexpr functions.Yes
C++2014-N3653

Initialization of aggregate classes with fewer initializers than members

For instance, this initialization has fewer initializers than members. The member c is initialized with the value 0 and d is initialized with the value s.

struct S { 
   int a; 
   const char* b;
   int c;
   int d = b[a];};
S ss = { 1, "asdf" };

Yes
C++2014-N3654std::quotedYes
C++2014-N3656std::make_uniqueYes
C++2014-N3658std::integer_sequenceYes
C++2014-N3658std::shared_lock

No.

The use of std::shared_lock does not cause compilation errors but the construct is not semantically supported.

C++2014-N3664Calling new and delete operators in batches.This C++14 feature clarifies how successive calls to the new operator are implemented. No new syntax/keyword is introduced and therefore does not affect Polyspace support for C++14.
C++2014-N3668std::exchangePartially supported.
C++2014-N3670Using std::get with a data type to get one element in an std::tuple (provided there is only one element of the type in the tuple)Yes
C++2014-N3671Overloads for std::equal, std::mismatch and std::is_permutation function templates that accept two separate rangesYes
C++2014-N3733Removal of std::gets from <cstdio>Yes
C++2014-N3776Wording change for destructor of std::futureNo new syntax/keyword is introduced and therefore does not affect Polyspace support for C++14.
C++2014-N3779std::complex literals representing pure imaginary numbers with suffix i, if or ilYes
C++2014-N3781Use of single quotation mark as digit separator, for instance, 1'000.Yes
C++2014-N3786Prohibiting "out of thin air' results in C++14No new syntax/keyword is introduced and therefore does not affect Polyspace support for C++14.
C++2014-N3910Synchronizing behavior of signal handlersNo new syntax/keyword is introduced and therefore does not affect Polyspace support for C++14.
C++2014-N3924Discouraging use of rand()No new syntax/keyword is introduced and therefore does not affect Polyspace support for C++14.
C++2014-N3927Lock-free executionsNo new syntax/keyword is introduced and therefore does not affect Polyspace support for C++14.

See Also

Related Topics