https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114336

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I don't see how it can be critical, since it might just be 0 always, so it's
not a good idea to write code where that impl-defined value is critical.

For G++ the column number is the opening paren of
std::current_location::current() which doesn't seem curious to me.

We could subtract strlen("std::source_location::current") from that, but that
would give a weird value for weirdos doing weird things like:

auto loc = std::
  source_location::
  current
  ();

Since the line() value is always going to be the location of the () I think it
would be strange if the column was a different location.

But yes, this is one of the things that should be documented for conformance to
[defns.impl.defined].

Reply via email to