[Bug libstdc++/79433] __has_include(<new header>) is true but #include <new header> gives #error when -std=old

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Feb 9 19:11:00 GMT 2017


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

--- Comment #15 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Marc Mutz from comment #14)
> You can hide behind the letter of the standard, but you cannot escape the
> simple fact that __has_include is the intended mechanism to check for
> library features that added a new header. Proof: You need to include that
> header to get at the __cpp_lib macro, if any. If you can't use __has_include
> for that, because the header stabs you in the back, then that intended
> mechanism is broken. Call it conforming if you want, but it simply isn't.

Isn't it the same is true for any header that someone could create and not just
about standard headers?


More information about the Gcc-bugs mailing list