blob: 16dc0f52b64c5859373c46fedd6c866ed98cbc04 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// PR c++/115114
// { dg-do compile { target c++20 } }
struct X {} x;
struct Y {} y;
template<class T, class U>
struct A : T {
U m;
};
using ty1 = decltype(A{x, 42}); // OK
using ty1 = decltype(A(x, 42)); // OK, used to fail
using ty1 = A<X, int>;
template<class T, class U = int, class V = int>
struct B : T, V {
U m = 42;
};
using ty2 = decltype(B{x, y}); // OK
using ty2 = decltype(B(x, y)); // OK, used to fail
using ty2 = B<X, int, Y>;
|