| 1 |
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++17 %s |
| 2 |
|
| 3 |
template <typename... T> |
| 4 |
void foo(T &&...Params) { |
| 5 |
foo<T>(Unknown); // expected-error {{expression contains unexpanded parameter pack 'T'}}\ |
| 6 |
expected-error {{use of undeclared identifier 'Unknown'}} |
| 7 |
((foo<T>(Unknown)), ...); // expected-error {{use of undeclared identifier 'Unknown'}} |
| 8 |
} |
| 9 |
|
| 10 |
template <typename... U> struct A { |
| 11 |
template <typename... T> void foo(T &&...Params) { |
| 12 |
foo<T>((... + static_cast<U>(1))); // expected-error {{expression contains unexpanded parameter pack 'T'}} |
| 13 |
} |
| 14 |
}; |