blob: 4920ca4f4a0ebc35928b1c1e0b52dde38086ce0f [file] [log] [blame]
// PR c++/79501
// { dg-do compile { target c++17 } }
template<auto V>
struct X {
template<class T, auto>
struct B { T t; };
template<class T> B(T, decltype(V)=V) -> B<const T, V>;
auto foo() { return B{V}; }
};
X<42> x;
using type = decltype(x.foo());
using type = decltype(decltype(x)::B{42});
using type = X<42>::B<const int, 42>;