CMake/Source/Checks/cm_cxx_override.cxx
2016-06-27 10:37:41 -04:00

21 lines
217 B
C++

struct Foo
{
virtual int test() const = 0;
};
struct Bar : Foo
{
int test() const override { return 0; }
};
int test(Foo const& foo)
{
return foo.test();
}
int main()
{
Bar const bar;
return test(bar);
}