blob: 79a6706cd583f08088c8a8ad0147edf4feffd9f1 [file] [log] [blame]
// Build don't link:
// Origin: Jakub Jelinek <jakub@redhat.com>
// excess errors test - XFAIL *-*-*
namespace N
{
class X;
template <class T>
class Y
{
public:
inline Y () {}
inline operator const Y<X> & () const
{
return *reinterpret_cast<const Y<X> *>(this);
}
};
}
class bar
{
public:
inline bar () {}
inline bar (const ::N::Y< ::N::X>& a);
};
class foo
{
bool b;
public:
foo();
void x () throw(bar);
};
void foo::x() throw(bar)
{
if (!b) throw bar (static_cast<::N::X*>(this)); // ERROR - parse error
}