2014-05-15 13:32:30 +04:00
|
|
|
|
|
|
|
#if !HAVE_OVERRIDE_CONTROL
|
2015-01-03 16:57:31 +03:00
|
|
|
#if EXPECT_OVERRIDE_CONTROL
|
2014-05-15 13:32:30 +04:00
|
|
|
#error "Expect override control feature"
|
2015-01-03 16:57:31 +03:00
|
|
|
#endif
|
2014-05-15 13:32:30 +04:00
|
|
|
#else
|
|
|
|
|
|
|
|
struct A
|
|
|
|
{
|
|
|
|
virtual int getA() { return 7; }
|
|
|
|
};
|
|
|
|
|
|
|
|
struct B final : A
|
|
|
|
{
|
|
|
|
int getA() override { return 42; }
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2015-01-03 17:09:53 +03:00
|
|
|
#if !HAVE_NULLPTR
|
|
|
|
#error "Expect nullptr feature"
|
|
|
|
#else
|
|
|
|
|
|
|
|
const char* getString()
|
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2014-05-15 13:32:30 +04:00
|
|
|
int main()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|