================
@@ -282,4 +283,25 @@ static_assert(S<short *>().SizeOfT<char>() == sizeof(short 
*), "");
 
 } // namespace GH68490
 
+namespace GH83608 {
+
+class single;
+
+class check_constructible {
+  // This makes it a non-aggregate in C++20+.
+  check_constructible() = default;
+
+  friend class single;
+};
+
+struct single {
+  template <class T> single(T u, check_constructible = {}) {}
+};
+
+// We perform access checking when substituting into the default argument.
+// Make sure it runs within class single.
----------------
cor3ntin wrote:

```suggestion
// Make sure it runs within the context of 'single'.
```

https://github.com/llvm/llvm-project/pull/141207
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to