blob: 9d95b0d669e39d1206fb978cace4aa731b8b1490 [file] [log] [blame]
// PR c++/95066 - explicit malfunction with dependent expression.
// { dg-do compile { target c++2a } }
template <typename T>
struct Foo {
template <typename U>
explicit(static_cast<U>(true)) operator Foo<U>();
};
template <typename T>
template <typename U>
Foo<T>::operator Foo<U>() {
return {};
}
int
main ()
{
Foo<float> a;
Foo<int> b = a; // { dg-error "conversion" }
}