@@ -110,8 +110,8 @@ struct Foo {
110
110
111
111
template <typename X, int Y>
112
112
using Bar = Foo<X, sizeof (X)>; // expected-note {{candidate template ignored: couldn't infer template argument 'X'}} \
113
- // expected-note {{implicit deduction guide declared as 'template <typename X> requires __is_deducible(test9::Bar, Foo<type-parameter-0-0 , sizeof(type-parameter-0-0 )>) Bar(Foo<type-parameter-0-0 , sizeof(type-parameter-0-0 )>) -> Foo<type-parameter-0-0 , sizeof(type-parameter-0-0 )>'}} \
114
- // expected-note {{implicit deduction guide declared as 'template <typename X> requires __is_deducible(test9::Bar, Foo<type-parameter-0-0 , sizeof(type-parameter-0-0 )>) Bar(const type-parameter-0-0 (&)[sizeof(type-parameter-0-0 )]) -> Foo<type-parameter-0-0 , sizeof(type-parameter-0-0 )>'}} \
113
+ // expected-note {{implicit deduction guide declared as 'template <typename X> requires __is_deducible(test9::Bar, Foo<X , sizeof(X )>) Bar(Foo<X , sizeof(X )>) -> Foo<X , sizeof(X )>'}} \
114
+ // expected-note {{implicit deduction guide declared as 'template <typename X> requires __is_deducible(test9::Bar, Foo<X , sizeof(X )>) Bar(const X (&)[sizeof(X )]) -> Foo<X , sizeof(X )>'}} \
115
115
// expected-note {{candidate template ignored: constraints not satisfied [with X = int]}} \
116
116
// expected-note {{cannot deduce template arguments for 'Bar' from 'Foo<int, 4UL>'}}
117
117
@@ -138,13 +138,13 @@ namespace test11 {
138
138
struct A {};
139
139
template <class T > struct Foo { T c; };
140
140
template <class X , class Y =A>
141
- using AFoo = Foo<Y>; // expected-note {{candidate template ignored: could not match 'Foo<type-parameter-0-0 >' against 'int'}} \
142
- // expected-note {{implicit deduction guide declared as 'template <class Y = A> requires __is_deducible(test11::AFoo, Foo<type-parameter-0-0 >) AFoo(Foo<type-parameter-0-0 >) -> Foo<type-parameter-0-0 >'}} \
141
+ using AFoo = Foo<Y>; // expected-note {{candidate template ignored: could not match 'Foo<Y >' against 'int'}} \
142
+ // expected-note {{implicit deduction guide declared as 'template <class Y = A> requires __is_deducible(test11::AFoo, Foo<Y >) AFoo(Foo<Y >) -> Foo<Y >'}} \
143
143
// expected-note {{candidate template ignored: constraints not satisfied [with Y = int]}} \
144
144
// expected-note {{cannot deduce template arguments for 'AFoo' from 'Foo<int>'}} \
145
- // expected-note {{implicit deduction guide declared as 'template <class Y = A> requires __is_deducible(test11::AFoo, Foo<type-parameter-0-0 >) AFoo(type-parameter-0-0 ) -> Foo<type-parameter-0-0 >'}} \
145
+ // expected-note {{implicit deduction guide declared as 'template <class Y = A> requires __is_deducible(test11::AFoo, Foo<Y >) AFoo(Y ) -> Foo<Y >'}} \
146
146
// expected-note {{candidate function template not viable: requires 0 arguments, but 1 was provided}} \
147
- // expected-note {{implicit deduction guide declared as 'template <class Y = A> requires __is_deducible(test11::AFoo, Foo<type-parameter-0-0 >) AFoo() -> Foo<type-parameter-0-0 >'}}
147
+ // expected-note {{implicit deduction guide declared as 'template <class Y = A> requires __is_deducible(test11::AFoo, Foo<Y >) AFoo() -> Foo<Y >'}}
148
148
149
149
AFoo s = {1 }; // expected-error {{no viable constructor or deduction guide for deduction of template arguments of 'AFoo'}}
150
150
} // namespace test11
@@ -211,9 +211,9 @@ template<typename> concept False = false;
211
211
template <False W>
212
212
using BFoo = AFoo<W>; // expected-note {{candidate template ignored: constraints not satisfied [with V = int]}} \
213
213
// expected-note {{cannot deduce template arguments for 'BFoo' from 'Foo<int *>'}} \
214
- // expected-note {{implicit deduction guide declared as 'template <class V> requires __is_deducible(AFoo, Foo<type-parameter-0-0 *>) && __is_deducible(test15::BFoo, Foo<type-parameter-0-0 *>) BFoo(type-parameter-0-0 *) -> Foo<type-parameter-0-0 *>}} \
215
- // expected-note {{candidate template ignored: could not match 'Foo<type-parameter-0-0 *>' against 'int *'}} \
216
- // expected-note {{template <class V> requires __is_deducible(AFoo, Foo<type-parameter-0-0 *>) && __is_deducible(test15::BFoo, Foo<type-parameter-0-0 *>) BFoo(Foo<type-parameter-0-0 *>) -> Foo<type-parameter-0-0 *>}}
214
+ // expected-note {{implicit deduction guide declared as 'template <class V> requires __is_deducible(AFoo, Foo<V *>) && __is_deducible(test15::BFoo, Foo<V *>) BFoo(V *) -> Foo<V *>}} \
215
+ // expected-note {{candidate template ignored: could not match 'Foo<V *>' against 'int *'}} \
216
+ // expected-note {{template <class V> requires __is_deducible(AFoo, Foo<V *>) && __is_deducible(test15::BFoo, Foo<V *>) BFoo(Foo<V *>) -> Foo<V *>}}
217
217
int i = 0 ;
218
218
AFoo a1 (&i); // OK, deduce Foo<int *>
219
219
@@ -263,12 +263,12 @@ template<typename T> requires False<T> // expected-note {{because 'int' does not
263
263
Foo (T) -> Foo<int >;
264
264
265
265
template <typename U>
266
- using Bar = Foo<U>; // expected-note {{could not match 'Foo<type-parameter-0-0 >' against 'int'}} \
267
- // expected-note {{implicit deduction guide declared as 'template <typename U> requires __is_deducible(test18::Bar, Foo<type-parameter-0-0 >) Bar(Foo<type-parameter-0-0 >) -> Foo<type-parameter-0-0 >'}} \
266
+ using Bar = Foo<U>; // expected-note {{could not match 'Foo<U >' against 'int'}} \
267
+ // expected-note {{implicit deduction guide declared as 'template <typename U> requires __is_deducible(test18::Bar, Foo<U >) Bar(Foo<U >) -> Foo<U >'}} \
268
268
// expected-note {{candidate template ignored: constraints not satisfied}} \
269
- // expected-note {{implicit deduction guide declared as 'template <typename T> requires False<type-parameter-0-0 > && __is_deducible(test18::Bar, Foo<int>) Bar(type-parameter-0-0 ) -> Foo<int>'}} \
269
+ // expected-note {{implicit deduction guide declared as 'template <typename T> requires False<T > && __is_deducible(test18::Bar, Foo<int>) Bar(T ) -> Foo<int>'}} \
270
270
// expected-note {{candidate function template not viable}} \
271
- // expected-note {{implicit deduction guide declared as 'template <typename U> requires __is_deducible(test18::Bar, Foo<type-parameter-0-0 >) Bar() -> Foo<type-parameter-0-0 >'}}
271
+ // expected-note {{implicit deduction guide declared as 'template <typename U> requires __is_deducible(test18::Bar, Foo<U >) Bar() -> Foo<U >'}}
272
272
273
273
Bar s = {1 }; // expected-error {{no viable constructor or deduction guide for deduction of template arguments}}
274
274
} // namespace test18
@@ -296,8 +296,8 @@ class Foo {};
296
296
// Verify that template template type parameter TTP is referenced/used in the
297
297
// template arguments of the RHS.
298
298
template <template <typename > typename TTP>
299
- using Bar = Foo<K<TTP>>; // expected-note {{candidate template ignored: could not match 'Foo<K<template-parameter-0-0 >>' against 'int'}} \
300
- // expected-note {{implicit deduction guide declared as 'template <template <typename> typename TTP> requires __is_deducible(test20::Bar, Foo<K<template-parameter-0-0 >>) Bar(Foo<K<template-parameter-0-0 >>) -> Foo<K<template-parameter-0-0 >>'}}
299
+ using Bar = Foo<K<TTP>>; // expected-note {{candidate template ignored: could not match 'Foo<K<TTP >>' against 'int'}} \
300
+ // expected-note {{implicit deduction guide declared as 'template <template <typename> typename TTP> requires __is_deducible(test20::Bar, Foo<K<TTP >>) Bar(Foo<K<TTP >>) -> Foo<K<TTP >>'}}
301
301
302
302
template <class T >
303
303
class Container {};
0 commit comments