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.
}
-
- This resolved the following Developer Community ticket. std::mdspan not working with [] operator – Developer Community
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
- C++ copy elision not performed when using ternary operator in return statement
- Access to invalid memory when using an explicitly created initializer list in a for loop with /permissive-
- “C4388 – signed/unsigned mismatch” not triggering for sizeof
- Error message “predefined C++ types (compiler internal), continuing without source annotations””
- Regression in MSVC++ 16.8: C++ multiple inheritance incorrectly allows operator() of private base classes to be accessible
- std::invoke with a constexpr function is falsely noexcept with /permissive
- error C7608: atomic constraint should be a constant expression
- constant evaluation with do not works with msvc 19 latest
- Using std::format in a module requires including format header in .cpp files using that module
- [[msvc::no_unique_address]] nonconformant class layout for nested non-unique-address empty classes
- Partial specialization of std::formatter in module is not found in other module.
- std::mdspan not working with [] operator
- explicit template instantiation wrongly checks private base class accessibility
- Internal compiler error with C++ Modules and Coroutine
- MSVC’s __declspec(empty_bases) and [[msvc::no_unique_address]] don’t work together
- Compiler hang when when code below is compiled with /std:c++20
- ICE in stdexec metaprogramming
- False branch of if constexpr is evaluated in alias template, in lambda
- MSVC incorrectly considers a trivial but noexcept(false) destructor to be non-throwing
- MSVC incorrectly considers reference to a cv-/ref-qualified function type to be valid in a requires-expression
- C++ modules: Internal compiler error when using std::stacktrace
- Class derived from std::expected can’t be constructed with bool value type
- ICE with template code and friend
- Internal compiler error caused by unparenthesized “sizeof” within requires-expression
- MSVC wrong recursive alias error
- Bogus C4716 when explicitly instantiating auto member function with /Gv
- [regression] Bogus
static_assert
failure in VS 2022 17.11 Preview 1.0 - Code compiles in GCC and Clang, but fails in MSVC
- ICE on invalid requires clause
- C++
requires requires
parsing error? - Fatal error C1001 with simple code only with VS2022 17.10
- internal compilator error
- C++ compiler regression constexpr constructors
- C++ compiler bug in 17.10.1: std::enable_if_t SFINAE fails to resolve template function
- C++ 20 header unit problem
- __builtin_bit_cast Internal compiler error
- A capture in lambda expression of constant bit-fields by reference with initializer is totally broken
- Internal compiler error related to “requires”
- VS 2022 17.11.0 Preview 2: intellisense or compiler bug: type is not a class template
- Error C7576 produces ‘Unhandled Exception’ error in cl.exe when building 32-bit x86 code
- Reject valid auto with braced initializer in new-expression
- __is_nothrow_assignable Builtin Produces Incorrect Value
- tab-complete.c(4023): fatal error C1001: Internal compiler error. (compiler file ‘msc1.cpp’, line 1611)
- No warning about deprecated enum usage
- ICE with STD Module usage (compiler file ‘msc1.cpp’, line 1587)
- Friendship to a function through a template class is giving an internal error.
- Regression: constexpr capture required in nested lambda with inferred argument
- Expansion of a nested template pack inside a template lambda
- Internal compiler error when initializing std::function member via default argument depending on parameter pack
- implicitly generated special member functions do not properly inherit noexcept specification from base classes
std::is_constructible_v
incorrectly evaluates to false with aggregate class and a member containing an array- fatal error C1001: Internal compiler error.
- C26493 false positive initializing a base class
- Apparently False C++ C2385 error
- Mismatched pack expansion in requires expression is incorrectly treated as expansion of empty pack
- C26493 false positive initializing a base class
- Internal compiler error for C++20 designated initializers in non-type template parameter
- VisualStudio v17.10.3 won’t compile my C code
- initializing capture clause does not work with access into this
- Unary + on a function is incorrectly considered not to be a constant expression
- Reject valid constexpr variable in lambda in requires-expression
- Bug? (erroneous error C3865: ‘__thiscall’: can only be used on native member functions)
- Instantianizing a concept with a nested type of a struct template instantiated with a variadic function causes errors: C2923 and C2065.
- ICE with operator& inside virtual destructor
- C26493 false positive initializing a base class
- False compilation error when unpacking a template parameter pack into a template with more than one parameter
- Internal Compiler Error VS17.10 Regression
- Regression in 19.40 when using co_await in a lambda capture
- Internal compiler error in trees.c, line 12009
- The discarded std::basic_format_string causes C1001: Internal compiler error.
- 17.11 Preview 3 and later: seemingly bogus static_assert failure
- MSVC 17.11 regression: “RWTH OpenMesh” ICE in msc1.cpp, line 1611
- C++ Syntax Error after upgrading to Visual Studio 17.11.0
- Visual Studio C++ version 17.11.0 cannot perform constexpr evaluation in certain contexts
- ‘this’ keyword is not evaluated appropriately in some context evaluations
- VS2022 17.11.0 GA Internal Compiler Error building C++ code
- Incorrect if constexpr usage in lambad causes ICE
- C++ requires expression name shadowing in const-evaluated context
- C++ failed to compile, this caputures in lambda as __this, and incorrect return type detection
- VS 17.11.1: Compiler fails to match definition to declaration when /permissive- is specified
- Internal compiler error C1001 with latest version of VS2022
- 17.11 fails to compile templated code under C++20
- Unresolved token for TypeForwardedToAttribute in C++/CLI
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.
0 comments
Be the first to start the discussion.