@@ -13,6 +13,17 @@ struct X0<int, A> {
13
13
static const unsigned value = 1 ;
14
14
};
15
15
16
+ template <class T >
17
+ struct type_identity {
18
+ using type = T;
19
+ };
20
+
21
+ template <class T >
22
+ using type_identity_t = typename type_identity<T>::type;
23
+
24
+ template <typename ... T>
25
+ struct args_tag {};
26
+
16
27
template <int > struct X0i ;
17
28
template <long > struct X0l ;
18
29
int array_x0a[X0<long , X0l>::value == 0 ? 1 : -1 ];
@@ -431,6 +442,17 @@ namespace deduction_after_explicit_pack {
431
442
i<int , int >(0 , 1 , 2 , 3 , 4 , 5 ); // expected-error {{no match}}
432
443
}
433
444
445
+ template <typename ... T>
446
+ void bar (args_tag<T...>, type_identity_t <T>..., int mid, type_identity_t <T>...) {}
447
+ void call_bar () {
448
+ bar (args_tag<int , int >{}, 4 , 8 , 1001 , 16 , 23 );
449
+ }
450
+ template <typename ... Y, typename ... T>
451
+ void foo (args_tag<Y...>, args_tag<T...>, type_identity_t <T>..., int mid, type_identity_t <T>...) {}
452
+ void call_foo () {
453
+ foo (args_tag<const int ,const int , const int >{}, args_tag<int , int , int >{}, 4 , 8 , 9 , 15 , 16 , 23 , 1 );
454
+ }
455
+
434
456
// GCC alarmingly accepts this by deducing T={int} by matching the second
435
457
// parameter against the first argument, then passing the first argument
436
458
// through the first parameter.
0 commit comments