ThFl ThFl -4 years ago 133
C++ Question

Does VisualStudio 2017 already support C++17 code contracts?

does anyone know whether VS2017 already has support for code contracts as seen here C++17 code contracts?

When I try to use them using

explicit IniHandler(std::string fileName) [[expects: fileName != nullptr]]
{
this->fileName = fileName;
}


It does not seem to work.

I am using the command line option
/std:c++latest
but still I get the warning
"Identifier excpected".

Any help is gladly appreciated :)

Answer Source

Contracts are not part of C++17, and AFAIK there isn't even a TS (technical specification) available. The latest paper on contracts is P0542R0.

Regardless, you can find all available C++17 features here as NathanOliver mentioned in the comments.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download