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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Should we add /D_USE_DETAILED_FUNCTION_NAME_IN_SOURCE_LOCATION=0 to one of PM_CL in usual_20_matrix.lst to test basic function names? is any PM_CL ok for that? After my current changes we test only detailed names.
How can we find "main"?
It's different from _EDG_ and C1XX in runtime, and you can't print it in compile time...
Error messages are not helpful either:
C:\Dev\STL\tests\std\tests\P1208R6_source_location\test.cpp(320): error C2131: expression did not evaluate to a constant
C:\Dev\STL\tests\std\tests\P1208R6_source_location\test.cpp(174): note: failure was caused by call of undefined function or one not declared 'constexpr'
C:\Dev\STL\tests\std\tests\P1208R6_source_location\test.cpp(174): note: see usage of '_wassert'
C:\Dev\STL\tests\std\tests\P1208R6_source_location\test.cpp(320): note: the call stack of the evaluation (the oldest call first) is
C:\Dev\STL\tests\std\tests\P1208R6_source_location\test.cpp(320): note: while evaluating function 'bool test(void)'
C:\Dev\STL\tests\std\tests\P1208R6_source_location\test.cpp(305): note: while evaluating function 'void sub_member_test(void)'
C:\Dev\STL\tests\std\tests\P1208R6_source_location\test.cpp(174): note: while evaluating function 'void _wassert(const wchar_t *,const wchar_t *,unsigned int)'
For _EDG_ I created a mini app and hover my mouse to variables to find out:
By the way, how do you find out C1XX values in compile time?
You preserve the compile time value until runtime where you can examine it. In this case, the function names all have static storage duration like string literals. You can simply return the value from the function to initialize a constinit const char* that you print in main: https://www.godbolt.org/z/jxj7PPofh.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed In: Visual Studio 2022 version 17.11.2
DevCom-10199227