This is the mail archive of the gcc-patches@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]

[PATCH] Only define __cpp_lib_constexpr_char_traits for C++17


This macro should not be defined unconditionally.

The macro isn't official (it was proposed in P0426R1 but doesn't
appear in SD-6 or the drafts, or the C++2a working paper) so I haven't
added any tests. Ideally we would have negative tests for each feature
test macro, to make sure they aren't defined when the feature isn't
available. I've done a review and this seems to be the only problem.

	* include/bits/char_traits.h (__cpp_lib_constexpr_char_traits): Only
	define for C++17 and above.

Tested powerpc64le-linux, committed to trunk.

Attachment: patch.txt
Description: Text document


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