https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102350
--- Comment #18 from Peter Dimov <pdimov at gmail dot com> --- I would use it like this: https://godbolt.org/z/1eqEx6678 #include <source_location> struct error_category { }; error_category const& system_category(); struct error_code { error_code( int v, error_category const& cat, void const* loc = __builtin_source_location() ); }; int main() { error_code ec( 5, system_category() ); } provided, of course, I have some not-undefined way to interpret its result.