https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79433
Marc Mutz changed:
What|Removed |Added
Status|RESOLVED|UNCONFIRMED
Resolution|INVALID
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
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79433
Eric Gallager changed:
What|Removed |Added
CC||egall at gwmail dot gwu.edu
--- Comment
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79433
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
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.
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.
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