| 1 |
struct S { |
| 2 |
inline virtual void foo () = 0; // { dg-bogus "used but never defined" } |
| 3 |
#if __cplusplus > 201703L |
| 4 |
constexpr virtual void bar () = 0; // { dg-bogus "used but never defined" "" { target c++2a } } |
| 5 |
#else |
| 6 |
inline virtual void bar () = 0; // { dg-bogus "used but never defined" "" { target c++17_down } } |
| 7 |
#endif |
| 8 |
S () {} |
| 9 |
}; |
| 10 |
struct T : public S { |
| 11 |
inline virtual void foo () {} |
| 12 |
#if __cplusplus > 201703L |
| 13 |
constexpr virtual void bar () {} |
| 14 |
#else |
| 15 |
inline virtual void bar () {} |
| 16 |
#endif |
| 17 |
T () {} |
| 18 |
}; |
| 19 |
T t; |
| 20 |
void foo (S *s) { s->foo (); s->bar (); } |