Commit e9013db2 by Martin v. Löwis

New test case.

From-SVN: r29493
parent f3310c0d
// Based on a test case by Andrew Bell <andrew.bell@bigfoot.com>
// Check for pointer-to-virtual-function calls on
// bases without virtual functions.
struct B{};
struct D:B{
virtual void foo();
};
void D::foo(){}
int main()
{
B *b = new D;
void (B::*f)() = static_cast<void (B::*)()>(&D::foo);
(b->*f)();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment