blob: cf1edb6bdf96ec6b2eb248a986225bd9dd1d933c [file] [log] [blame]
// PR c++/94885 - paren-init of aggregates accepts invalid code.
// { dg-do compile { target c++20 } }
template <typename T, typename = decltype(T(0))> // { dg-error "could not convert" }
void foo();
struct base {};
struct derived : base {};
void
bar()
{
foo<derived>(); // { dg-error "no matching function" }
}