[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 11 03:25:06 PST 2024


================
@@ -153,16 +153,16 @@ namespace dr1460 { // dr1460: 3.5
   namespace Defaulted {
     union A { constexpr A() = default; };
     union B { int n; constexpr B() = default; };
-    // cxx11-17-error at -1 {{defaulted definition of default constructor is not constexpr}}
+    // cxx11-17-error at -1 {{defaulted definition of default constructor that marked constexpr but never produces a constant expression is a C++23 extension}}
----------------
Endilll wrote:

11 through 17 we expect a 23 extension warning, but what happens in 20 mode?

https://github.com/llvm/llvm-project/pull/77753


More information about the cfe-commits mailing list