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; }
|
|
|
|
};
|
|
|
|
|
2015-01-14 21:35:53 +03:00
|
|
|
struct B final : A
|
2014-05-15 13:32:30 +04:00
|
|
|
{
|
|
|
|
int getA() override { return 42; }
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2015-01-03 17:09:53 +03:00
|
|
|
#if !HAVE_NULLPTR
|
|
|
|
#error "Expect nullptr feature"
|
|
|
|
#else
|
|
|
|
|
2015-01-12 22:02:17 +03:00
|
|
|
#if !HAVE_INHERITING_CONSTRUCTORS
|
|
|
|
# if EXPECT_INHERITING_CONSTRUCTORS
|
|
|
|
# error Expect cxx_inheriting_constructors support
|
|
|
|
# endif
|
|
|
|
#else
|
|
|
|
# if !EXPECT_INHERITING_CONSTRUCTORS
|
|
|
|
# error Expect no cxx_inheriting_constructors support
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !HAVE_FINAL
|
|
|
|
# if EXPECT_FINAL
|
|
|
|
# error Expect cxx_final support
|
|
|
|
# endif
|
|
|
|
#else
|
|
|
|
# if !EXPECT_FINAL
|
|
|
|
# error Expect no cxx_final support
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !HAVE_INHERITING_CONSTRUCTORS_AND_FINAL
|
|
|
|
# if EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL
|
|
|
|
# error Expect cxx_inheriting_constructors and cxx_final support
|
|
|
|
# endif
|
|
|
|
#else
|
|
|
|
# if !EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL
|
|
|
|
# error Expect no combined cxx_inheriting_constructors and cxx_final support
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2015-01-03 17:09:53 +03:00
|
|
|
const char* getString()
|
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2014-05-15 13:32:30 +04:00
|
|
|
int main()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|