This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]