fork download
  1. struct Entry {
  2. int x;
  3. int y;
  4. };
  5. struct Indirect : public Entry { };
  6. template<typename T> struct EntryOr : public T, Indirect { } ;
  7.  
  8. // From C code
  9. struct A {
  10. int x;
  11. }
  12.  
  13. int main()
  14. {
  15. EntryOr<A> foo;
  16. foo.x = 5; // A::x
  17. foo.y = 7; // Entry::y
  18. }
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout

Standard output is empty