PR c++/78282 - auto template and pack expansion
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / auto-fn36.C
blobf89c0928f11cf8e2600840c46c6ec426584ee663
1 // PR c++/78282
2 // { dg-do compile { target c++14 } }
4 struct null_node
6   null_node(const null_node&);
7 };
9 extern null_node null;
11 template <typename T>
12 auto get() { return null; }
14 template <typename... Ts>
15 struct inheritor: Ts...
17   inheritor(const inheritor& outer)
18     : Ts(get<Ts...>())...
19     { }
22 void test()
24   extern inheritor<null_node> example;
25   inheritor<null_node> result(example);