0

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 :)

porges
  • 30,133
  • 4
  • 83
  • 114
Thomas Flinkow
  • 4,845
  • 5
  • 29
  • 65

1 Answers1

6

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.

Vittorio Romeo
  • 90,666
  • 33
  • 258
  • 416