[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:07 PST 2024


================
@@ -349,8 +349,8 @@ namespace dr1684 { // dr1684: 3.6
   };
   constexpr int f(NonLiteral &) { return 0; }
   constexpr int f(NonLiteral) { return 0; }
-  // since-cxx11-error at -1 {{constexpr function's 1st parameter type 'NonLiteral' is not a literal type}}
-  //   since-cxx11-note@#dr1684-struct {{'NonLiteral' is not literal because it is not an aggregate and has no constexpr constructors other than copy or move constructors}}
+  // cxx11-20-error at -1 {{constexpr function with 1st non-literal parameter type 'NonLiteral' is a C++23 extension}}
+  // cxx11-20-note@#dr1684-struct {{'NonLiteral' is not literal because it is not an aggregate and has no constexpr constructors other than copy or move constructors}}
----------------
Endilll wrote:

```suggestion
  //   cxx11-20-note@#dr1684-struct {{'NonLiteral' is not literal because it is not an aggregate and has no constexpr constructors other than copy or move constructors}}
```

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


More information about the cfe-commits mailing list