Open Asaaj opened 1 year ago
hmm, don't fully understand why the operator can't be deduced; defo seems like msvc bug; will keep trying to find some local solution and will report the issue to the Microsoft; thanks for pointing it out @Asaaj
As a workaround, change the capture list of the lambda function to &
. This makes the compiler accept the code, and shouldn't make any difference in the generated code, as you're not using any captured variable.
Nicez thanks @, BTW msvc is aware of the issue and working on the fix.
Expected Behavior
Using the
event<e>[ !guard ]
notation should compile on all platforms.Actual Behavior
The above notation does not compile on MSVC version 19.33 with C++20 enabled. Note that it does compile in 19.33 with C++17, and in 19.32 with C++17/20
Error from example linked below:
Steps to Reproduce the Problem
[! guard]
notation, such as the "Action Guards" example in the official examples./std:c++20
A simplified version of that example demonstrating this issue is available here: https://godbolt.org/z/58necxe5a
Specifications