February 11th, 2025

MSVC Compiler Updates in Visual Studio 2022 version 17.13

Cameron DaCamara
Senior Software Engineer

Introduction

For this update, we have changed things up a little bit. We now have more distinct buckets of fixes/implemented features. This is to help guide readers who care about specific features to more easily see how the compiler front-end team is making progress on the things you care about.

17.12 notes for reference.

C++23 Features

As part of our continuing ramp-up on C++23 conformance, the team has implemented the following features. In future releases customers can expect to see continued acceleration towards C++23 conformance.

Note: C++23 features can be used by either adding /std:c++latest or /std:c++23preview to the command line. In addition, features used from unfinished standards may not have full IntelliSense support.

Adds a new literal suffix which enables a literal to deduce to a form of size_t.

constexpr auto x = 10zu; // Deduces to 'size_t'
constexpr auto y = 10z;  // Deduces to signed form of 'size_t' (i.e. 'ptrdiff_t')

Relaxes constexpr restrictions around labels, goto, and non-literal user-defined types.

constexpr bool f() {
  if (std::is_constant_evaluated()) {
    return true;
  }
  goto label;
label:
  return false;
}
static_assert(f()); // OK - constant evaluation never reaches the 'goto' statement.

Compiler improvements for 17.13

The categories below are some areas that the team has identified as high impact feature areas of the compiler toolset for customers. The team is dedicated to ensuring the areas below continue to be developed and improved over time, and we thank you all for filing bugs and being patient as our team works through issues.

C++/CLI

Diagnostics

constexpr

C++ modules

Reliability

Correctness

Closing

As always, we welcome your feedback. Feel free to send any comments through e-mail at visualcpp@microsoft.com or through Twitter @visualc. Also, feel free to follow Cameron DaCamara on Twitter @starfreakclone.

If you encounter other problems with MSVC in VS 2022 please let us know via the Report a Problem option, either from the installer or the Visual Studio IDE itself. For suggestions or bug reports, let us know through Developer Community.

Author

Cameron DaCamara
Senior Software Engineer

Senior Engineer, Visual C++ compiler front-end team at Microsoft.

0 comments