https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102350
--- Comment #8 from Peter Dimov <pdimov at gmail dot com> --- (In reply to Jakub Jelinek from comment #6) > Note, having the struct somewhere else isn't that useful unless you know > exactly how its non-static data members are named and what they mean, so > ideally a class with accessor methods, which is what std::source_location > provides currently. I was going to undefined-behavior my way to victory by making boost::source_location layout-compatible with the internal struct, and just casting the result of __builtin_source_location to boost::source_location const*. I think this works under the GCC object model?