[Bug c++/99672] std::source_location yield different column numbers between free function and template functions
hewillk at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Mar 21 09:18:03 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99672
--- Comment #3 from 康桓瑋 <hewillk at gmail dot com> ---
I think the issue of line() function also needs to do a patch.
https://godbolt.org/z/q8EPnG
====
constexpr int g(auto...) {
return std::source_location::current( // < opening paren line number
).line();
}
constexpr int f() {
return std::source_location::current(
).line(); // < closing paren line number
}
====
More information about the Gcc-bugs
mailing list