aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/class-deduction87.C15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction87.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction87.C
new file mode 100644
index 0000000..37296a4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction87.C
@@ -0,0 +1,15 @@
+// PR c++/94102
+// { dg-do compile { target c++17 } }
+
+namespace std {
+ template <typename _Tp> using decay_t = _Tp;
+}
+template <typename... B> struct Merged : B... {
+ template <typename... T> Merged(T... t) : B(t)... {}
+};
+template <typename... T> Merged(T...) -> Merged<std::decay_t<T>...>;
+int main() {
+ auto l1 = [] {};
+ auto l2 = [](int i) { return i; };
+ Merged(l1, l2);
+}