Skip to content

Commit 91074e6

Browse files
committed
Add a test case for deduction without separator
1 parent 2b72276 commit 91074e6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

clang/test/SemaTemplate/deduction.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,12 +447,18 @@ namespace deduction_after_explicit_pack {
447447
void call_bar() {
448448
bar(args_tag<int, int>{}, 4, 8, 1001, 16, 23);
449449
}
450+
450451
template <typename... Y, typename... T>
451452
void foo(args_tag<Y...>, args_tag<T...>, type_identity_t<T>..., int mid, type_identity_t<T>...) {}
452453
void call_foo() {
453454
foo(args_tag<const int,const int, const int>{}, args_tag<int, int, int>{}, 4, 8, 9, 15, 16, 23, 1);
454455
}
455456

457+
template <typename... Y, typename... T> void baz(args_tag<T...>, T..., T...) {}
458+
void call_baz() {
459+
baz(args_tag<int, int>{}, 1, 2, 3, 4);
460+
}
461+
456462
// GCC alarmingly accepts this by deducing T={int} by matching the second
457463
// parameter against the first argument, then passing the first argument
458464
// through the first parameter.

0 commit comments

Comments
 (0)