Closed
Description
Consider the following code snipet (CompilerExplorer link):
#include<source_location>
#include<iostream>
void test_source_location(std::source_location src = std::source_location::current()) {
std::cout << "called at " << src.line() << "\n";
}
int main() {
test_source_location();
}
The output results for Clang, GCC and MSVC (left-to-right) are:
As you can see - both GCC and MSVC reports function INVOCATION line number, while Clang report function DECLARATION-one
Metadata
Metadata
Assignees
Type
Projects
Status
Done