Change __cpp_explicit_bool to __cpp_conditional_explicit.
authorJason Merrill <jason@redhat.com>
Tue, 13 Nov 2018 04:32:25 +0000 (23:32 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 13 Nov 2018 04:32:25 +0000 (23:32 -0500)
People objected to the old macro name as unclear, so it was changed.

* c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
__cpp_conditional_explicit.

From-SVN: r266050

gcc/c-family/ChangeLog
gcc/c-family/c-cppbuiltin.c
gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C

index 6ce25c977831d60135f1fb2f08c465fcb16fc732..42bb5ca450b18de3860fe2739cef00c9dba12c0b 100644 (file)
@@ -1,3 +1,8 @@
+2018-11-12  Jason Merrill  <jason@redhat.com>
+
+       * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
+       __cpp_conditional_explicit.
+
 2018-11-09  Martin Sebor  <msebor@redhat.com>
 
        PR middle-end/81824
index e7f4c6690566217e3f8798a3d3b0ba50435edc6e..8dd62158b62de69f2d8d75033b42088ffb89e8fb 100644 (file)
@@ -978,7 +978,7 @@ c_cpp_builtins (cpp_reader *pfile)
       if (cxx_dialect > cxx17)
        {
          /* Set feature test macros for C++2a.  */
-         cpp_define (pfile, "__cpp_explicit_bool=201806");
+         cpp_define (pfile, "__cpp_conditional_explicit=201806");
          cpp_define (pfile, "__cpp_nontype_template_parameter_class=201806");
        }
       if (flag_concepts)
index faed6697382edd4148fab10a9f6e711bd5afde53..4289bfcfa525dfa40dc4d6c1b7109debf572a27f 100644 (file)
 
 // C++20 features
 
+#if __cpp_conditional_explicit != 201806
+# error "__cpp_conditional_explicit != 201806"
+#endif
+
 #if __cpp_nontype_template_parameter_class != 201806
 # error "__cpp_nontype_template_parameter_class != 201806"
 #endif