December 6th, 2024

MSVC Compiler Language Updates in Visual Studio 2022 version 17.12

Cameron DaCamara
Senior Software Engineer

Introduction

In alignment with the Visual Studio 2022 version 17.12 release, and based upon feedback received from the community, the MSVC compiler team would like to provide greater visibility into the C++ language-level fixes for customer-reported issues that made it into the release. This is similar to how the standard library team publishes regular changelogs (see VS 2022 17.12 for reference). The focus for Visual Studio 2022 version 17.12 is primarily to address bugs reported through Developer Community.

C++23 Features:

While our overall focus has been on fixing bugs reported via Developer Community, we implemented a C++23 feature to address one ticket.

    • P2128R6 Multidimensional subscript operator. This paper enables code such as:
struct Array {
    int arr[2][2];
    int operator[](int x, int y) const {
        return arr[x][y];
    }
};
int main() {
    Array arr = { {
        { 1, 2 },
        { 3, 4 }
    } };
    return arr[1, 1]; // Returns 4.
}

Over the next few MSVC toolset update releases, the compiler team is dramatically shifting towards improving C++23 conformance.

Developer Community Feedback:

First of all, thank you all for taking the time to report issues on MSVC compiler on Developer Community portal. We take your reports with utmost importance and seriousness. We know that we don’t respond to all issues in timely manner and as a result some bug reports stay there for multiple releases without resolution. We will do better here and will strive to maximize our developer capacity as much as possible. We really appreciate your patience and understanding while we work through these issues.

Fixes

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