2015-01-26 22:25:22 +03:00
|
|
|
#ifndef EXPECT_FINAL
|
2016-05-16 17:34:04 +03:00
|
|
|
#error EXPECT_FINAL not defined
|
2015-01-26 22:25:22 +03:00
|
|
|
#endif
|
|
|
|
#ifndef EXPECT_INHERITING_CONSTRUCTORS
|
2016-05-16 17:34:04 +03:00
|
|
|
#error EXPECT_INHERITING_CONSTRUCTORS not defined
|
2015-01-26 22:25:22 +03:00
|
|
|
#endif
|
|
|
|
#ifndef EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL
|
2016-05-16 17:34:04 +03:00
|
|
|
#error EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL not defined
|
2015-01-26 22:25:22 +03:00
|
|
|
#endif
|
|
|
|
#ifndef EXPECT_OVERRIDE_CONTROL
|
2016-05-16 17:34:04 +03:00
|
|
|
#error EXPECT_OVERRIDE_CONTROL not defined
|
2015-01-26 22:25:22 +03:00
|
|
|
#endif
|
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
|
2015-01-24 17:22:23 +03:00
|
|
|
#if !EXPECT_OVERRIDE_CONTROL
|
|
|
|
#error "Expect no override control feature"
|
|
|
|
#endif
|
2014-05-15 13:32:30 +04:00
|
|
|
|
|
|
|
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-17 17:58:45 +03:00
|
|
|
#if !HAVE_AUTO_TYPE
|
2016-05-16 17:34:04 +03:00
|
|
|
#error Expect cxx_auto_type support
|
2015-01-17 17:58:45 +03:00
|
|
|
#endif
|
2015-01-03 17:09:53 +03:00
|
|
|
|
2015-01-12 22:02:17 +03:00
|
|
|
#if !HAVE_INHERITING_CONSTRUCTORS
|
2016-05-16 17:34:04 +03:00
|
|
|
#if EXPECT_INHERITING_CONSTRUCTORS
|
|
|
|
#error Expect cxx_inheriting_constructors support
|
|
|
|
#endif
|
2015-01-12 22:02:17 +03:00
|
|
|
#else
|
2016-05-16 17:34:04 +03:00
|
|
|
#if !EXPECT_INHERITING_CONSTRUCTORS
|
|
|
|
#error Expect no cxx_inheriting_constructors support
|
|
|
|
#endif
|
2015-01-12 22:02:17 +03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !HAVE_FINAL
|
2016-05-16 17:34:04 +03:00
|
|
|
#if EXPECT_FINAL
|
|
|
|
#error Expect cxx_final support
|
|
|
|
#endif
|
2015-01-12 22:02:17 +03:00
|
|
|
#else
|
2016-05-16 17:34:04 +03:00
|
|
|
#if !EXPECT_FINAL
|
|
|
|
#error Expect no cxx_final support
|
|
|
|
#endif
|
2015-01-12 22:02:17 +03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !HAVE_INHERITING_CONSTRUCTORS_AND_FINAL
|
2016-05-16 17:34:04 +03:00
|
|
|
#if EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL
|
|
|
|
#error Expect cxx_inheriting_constructors and cxx_final support
|
|
|
|
#endif
|
2015-01-12 22:02:17 +03:00
|
|
|
#else
|
2016-05-16 17:34:04 +03:00
|
|
|
#if !EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL
|
|
|
|
#error Expect no combined cxx_inheriting_constructors and cxx_final support
|
|
|
|
#endif
|
2015-01-12 22:02:17 +03:00
|
|
|
#endif
|
|
|
|
|
2014-05-15 13:32:30 +04:00
|
|
|
int main()
|
|
|
|
{
|
|
|
|
}
|