Il 10/11/22 09:25, Marc Mutz via Development ha scritto:
unconditionally and we will detect post-C++17 library features only this
way, going forward:
#ifdef __cpp_lib_foo
# include <foo>
#endif
and no longer this way:
#if __has_include(<foo>) && __cplusplus > 201703L
# include <foo>
#endif
To not break existing uses, however, existing checks that do the
__has_include dance should not be cleaned up before we require the resp.
library feature unconditionally.
Hi,I'm not sure if this has been explicitly discussed, but a prerequisite for this scheme to work is that compiler vendors *do not* define library feature macros inside <version> that you cannot use in the current C++ version. In other words, having the proposed:
#if __cpp_some_cpp23_feature # include <cpp23_feature> #endifis never going to blow up with some #error inside the included header when compiling in pre-C++23 mode. I'm guessing that's always the case, right?
Thanks, -- Giuseppe D'Angelo | [email protected] | Senior Software Engineer KDAB (France) S.A.S., a KDAB Group company Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com KDAB - The Qt, C++ and OpenGL Experts
smime.p7s
Description: Firma crittografica S/MIME
_______________________________________________ Development mailing list [email protected] https://lists.qt-project.org/listinfo/development
