Tested x86_64-pc-linux-gnu, applying to trunk.

-- >8 --
Fixed by r16-2490.

        PR c++/115852

gcc/testsuite/ChangeLog:

        * g++.dg/cpp23/explicit-obj-lambda22.C: New test.
---
 .../g++.dg/cpp23/explicit-obj-lambda22.C          | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 gcc/testsuite/g++.dg/cpp23/explicit-obj-lambda22.C

diff --git a/gcc/testsuite/g++.dg/cpp23/explicit-obj-lambda22.C 
b/gcc/testsuite/g++.dg/cpp23/explicit-obj-lambda22.C
new file mode 100644
index 00000000000..de63efcfaa7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/explicit-obj-lambda22.C
@@ -0,0 +1,15 @@
+// PR c++/115852
+// { dg-do compile { target c++23 } }
+
+template<class...Ts0>
+auto x(Ts0&&...  ) requires requires {
+    []<class Self>(this Self&&) {
+
+    };
+} {
+    return 0;
+}
+
+int main() {
+    return x(1);
+}

base-commit: 8dc3baf9bce4541f075d2dd8f02048237de0f3ca
-- 
2.53.0

Reply via email to