Skip to content

Enable C++20 standard.

Dmitry Yu. Naumov requested to merge endJunction/ogs:C++20 into master

Of course, not all of the features are supported by the current compiler selection and we are restricted in that sense.

For now we have

    "gcc": "9.0",
    "clang": "9.0",
    "apple_clang": "11.0.0",
    "msvc": {
      "year": "2019",
      "number": "16",
      "toolset": "142"

where the msvc compiler has version 19 and the currently tested minimum is 19.24.

So according to the compiler support page the few interesting, IMO, things are now available:

  • constexpr try catch blocks
  • Allow lambda-capture [=, this]
  • Designated initializers
  • Concepts (partial)
  • init-statements for range-based for

and from the library:

  • std::endian
  • String prefix and suffix checking
  • std::lerp() and std::midpoint()
  • std::erase() and std::erase_if()
  1. Feature description was added to the changelog
Edited by Dmitry Yu. Naumov

Merge request reports