| 1 |
// { dg-do compile { target c++23 } } |
| 2 |
|
| 3 |
template<class T, class U, class V> struct F { |
| 4 |
F(T, U, V); // #1 |
| 5 |
F(T*, U*, V*); // #2 |
| 6 |
template<class W> |
| 7 |
F(int, int, W); // #3 |
| 8 |
}; |
| 9 |
|
| 10 |
F(bool, bool, bool) -> F<bool*, void*, int>; |
| 11 |
|
| 12 |
template<class T, class U> struct G : F<U, T, int> { |
| 13 |
using F<U, T, int>::F; |
| 14 |
}; |
| 15 |
|
| 16 |
using ty1 = decltype(G(true, 'a', 1)); // uses #1 |
| 17 |
using ty1 = G<char, bool>; |
| 18 |
|
| 19 |
using ty2 = decltype(G((bool*)0, (char*)0, (int*)0)); // uses #2 |
| 20 |
using ty2 = G<char, bool>; |
| 21 |
|
| 22 |
using ty3 = decltype(G(0, 0, 0)); // uses #3 |
| 23 |
using ty3 = G<int, int>; |
| 24 |
|
| 25 |
using ty4 = decltype(G(true, true, true)); // uses #4 |
| 26 |
using ty4 = G<void*, bool*>; |