<source_location>
: Remove EDG workaround for DevCom-10199227 by fsb4000 · Pull Request #4939 · microsoft/STL (original) (raw)
By the way, how do you find out C1XX values in compile time?
I mean this:
#if !defined(__clang__) && !defined(__EDG__) // TRANSITION, VSO-1285783
if (is_constant_evaluated()) {
assert(s.x.loc.function_name() == "main"sv);
} else
#endif // ^^^ workaround ^^^
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: