genex_test.cpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #if !HAVE_OVERRIDE_CONTROL
  2. #if EXPECT_OVERRIDE_CONTROL
  3. #error "Expect override control feature"
  4. #endif
  5. #else
  6. struct A
  7. {
  8. virtual int getA() { return 7; }
  9. };
  10. struct B final : A
  11. {
  12. int getA() override { return 42; }
  13. };
  14. #endif
  15. #if !HAVE_NULLPTR
  16. #error "Expect nullptr feature"
  17. #else
  18. #if !HAVE_INHERITING_CONSTRUCTORS
  19. # if EXPECT_INHERITING_CONSTRUCTORS
  20. # error Expect cxx_inheriting_constructors support
  21. # endif
  22. #else
  23. # if !EXPECT_INHERITING_CONSTRUCTORS
  24. # error Expect no cxx_inheriting_constructors support
  25. # endif
  26. #endif
  27. #if !HAVE_FINAL
  28. # if EXPECT_FINAL
  29. # error Expect cxx_final support
  30. # endif
  31. #else
  32. # if !EXPECT_FINAL
  33. # error Expect no cxx_final support
  34. # endif
  35. #endif
  36. #if !HAVE_INHERITING_CONSTRUCTORS_AND_FINAL
  37. # if EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL
  38. # error Expect cxx_inheriting_constructors and cxx_final support
  39. # endif
  40. #else
  41. # if !EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL
  42. # error Expect no combined cxx_inheriting_constructors and cxx_final support
  43. # endif
  44. #endif
  45. const char* getString()
  46. {
  47. return nullptr;
  48. }
  49. #endif
  50. int main()
  51. {
  52. }