This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/79433] __has_include(<new header>) is true but #include <new header> gives #error when -std=old
- From: "marc.mutz at kdab dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 09 Feb 2017 19:07:10 +0000
- Subject: [Bug libstdc++/79433] __has_include(<new header>) is true but #include <new header> gives #error when -std=old
- Auto-submitted: auto-generated
- References: <bug-79433-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79433
--- Comment #14 from Marc Mutz <marc.mutz at kdab dot com> ---
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.