blob: 7d1cd3db3984c06d9b4837389c4c943cedfd9326 [file] [log] [blame]
// PR c++/90767
// { dg-do compile }
struct X {
int n;
void foo (); // { dg-message "initializing argument 'this'" }
template<typename T>
operator T () const
{
if (n == 0)
foo (); // { dg-error "cannot convert 'const X\\*' to 'X\\*'" }
return n;
}
};