blob: 4f1115be16d6c189075ea08978ed052c6cc4c1f6 [file] [log] [blame]
// { dg-do assemble }
// Origin: Jakub Jelinek <jakub@redhat.com>
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)); // { dg-error "" } parse error
}