On 12/16/20 8:05 AM, Jonathan Wakely wrote:
Before CWG DR 1955 the controlling expression for an #elif must be
syntactically correct, meaning this won't compile with C++11 compilers
such as gcc 4.8:

The solution is to define __has_include(X) as 0 for compilers that don't
support it.

The second problem is that when <source_location> is found, it is used
without the std:: qualification.

libcody/ChangeLog:

        * internal.hh: Define fallback macros for __has_builtin and
        __has_include. Use __has_builtin for __builtin_FILE and
        __builtin_LINE. Define alias for std::source_location.

Built on GNu/Linux using both gcc-11 and gcc-4.8, and also by hacking
it so that __builtin_FILE and __builtin_LINE aren't found, and
<source_location> gets used.

OK for trunk?

great, thanks!

nathan


--
Nathan Sidwell

Reply via email to