2015-01-26 22:25:22 +03:00
|
|
|
#ifndef EXPECT_FINAL
|
|
|
|
# error EXPECT_FINAL not defined
|
|
|
|
#endif
|
|
|
|
#ifndef EXPECT_INHERITING_CONSTRUCTORS
|
|
|
|
# error EXPECT_INHERITING_CONSTRUCTORS not defined
|
|
|
|
#endif
|
|
|
|
#ifndef EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL
|
|
|
|
# error EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL not defined
|
|
|
|
#endif
|
|
|
|
#ifndef EXPECT_OVERRIDE_CONTROL
|
|
|
|
# error EXPECT_OVERRIDE_CONTROL not defined
|
|
|
|
#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
|
|
|
|
# error Expect cxx_auto_type support
|
|
|
|
#endif
|
2015-01-03 17:09:53 +03:00
|
|
|
|
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
|
|
|
|
|
2014-05-15 13:32:30 +04:00
|
|
|
int main()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|