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

--- Comment #16 from Peter Dimov <pdimov at gmail dot com> ---
(In reply to Jakub Jelinek from comment #14)
> But we haven't done that that way and how would headers know if the
> __builtin_source_location that is available is the old or new one?

The header could do

namespace std {

  struct __source_location_impl { ... };

  class source_location {

    using __impl = __source_location_impl;

    // ...

  };
}

unless the compiler looks specifically for a nested struct, in which case

  class source_location {

    struct __impl: __source_location_impl {};

    // ...

  };

Reply via email to