You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was resolved as fixed on 2021-09-07 by internal VS-PR-348924 in VS 2022 17.0. However, attempting to remove this workaround with VS 2022 17.3 Preview 3 fails with numerous compiler errors. We need to investigate and report these issues.
The text was updated successfully, but these errors were encountered:
EDG seems to have trouble computing the correct location.
D:\test>type test-edg-srcloc.cpp
#include <source_location>
template<unsigned> struct A {};
A<std::source_location::current().line()> x = 0;
D:\test>cl /std:c++20 /BE test-edg-srcloc.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.33.31627.1 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
test-edg-srcloc.cpp
"test-edg-srcloc.cpp", line 5: error: no suitable constructor exists to convert
from "int" to "A<26U>"
A<std::source_location::current().line()> x = 0;
^
Note that it thinks std::source_location::current().line() at line 5 evaluates to 26U, maybe because current is defined at line 26 in <source_location>.
Agreed. All remaining EDG checks in the test are either column number variation (which we don't care about) or are actually guarding an MSVC bug. Thanks!
We have a workaround for internal VSO-1285779 "REPORTED: EDG rejects
source_location
intrinsics withinconsteval
functions" in the test:STL/tests/std/tests/P1208R6_source_location/test.cpp
Line 4 in 969b2e2
This was resolved as fixed on 2021-09-07 by internal VS-PR-348924 in VS 2022 17.0. However, attempting to remove this workaround with VS 2022 17.3 Preview 3 fails with numerous compiler errors. We need to investigate and report these issues.
The text was updated successfully, but these errors were encountered: