[Bug c++/79433] __has_include reports wrong result for std headers that #error on __cplusplus

2017-02-08 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79433 Marc Mutz changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|INVALID

[Bug c++/79433] __has_include reports wrong result for std headers that #error on __cplusplus

2017-02-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79433 --- Comment #8 from Jonathan Wakely --- I guess another, novel, option would be a __try_include directive: #ifdef __try_include # if __try_include() // it was included without error # else // it wasn't found, or gave an error # endif #endif

[Bug c++/79433] __has_include reports wrong result for std headers that #error on __cplusplus

2017-02-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79433 --- Comment #7 from Jonathan Wakely --- (In reply to Marc Mutz from comment #1) > And no, checking __cplusplus in addition is not an option, since many > compilers, GCC included (__cplusplus==1, remember?), do not necessarily bump > __cplusplus

[Bug c++/79433] __has_include reports wrong result for std headers that #error on __cplusplus

2017-02-08 Thread egall at gwmail dot gwu.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79433 Eric Gallager changed: What|Removed |Added CC||egall at gwmail dot gwu.edu --- Comment

[Bug c++/79433] __has_include reports wrong result for std headers that #error on __cplusplus

2017-02-08 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79433 --- Comment #5 from Marc Mutz --- Andrew, you're taking the easy way out. It might be that it works as implemented, but that behaviour is useless. Please explain how one should detect, in a portable way, whether string_view and

[Bug c++/79433] __has_include reports wrong result for std headers that #error on __cplusplus

2017-02-08 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79433 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/79433] __has_include reports wrong result for std headers that #error on __cplusplus

2017-02-08 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79433 --- Comment #3 from Andrew Pinski --- __has_include just says the include exists and not if the include file works.

[Bug c++/79433] __has_include reports wrong result for std headers that #error on __cplusplus

2017-02-08 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79433 --- Comment #2 from Marc Mutz --- Ok, there is __cpp_lib_experimental_string_view, at least, but it's defined ... wait for it ... in , which you can't include.

[Bug c++/79433] __has_include reports wrong result for std headers that #error on __cplusplus

2017-02-08 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79433 --- Comment #1 from Marc Mutz --- And no, checking __cplusplus in addition is not an option, since many compilers, GCC included (__cplusplus==1, remember?), do not necessarily bump __cplusplus when they implement enough core features to make