fork download
  1. #include <stdio.h>
  2.  
  3. template<class T> struct Bar {
  4. Bar() {
  5. printf("My offset is %d\n", offset());
  6. }
  7. int offset() {
  8. return 0;
  9. }
  10. };
  11.  
  12. struct Foo {
  13. Bar<Foo> bar;
  14. Bar<Foo> baz;
  15. };
  16.  
  17. int main() {
  18. Foo foo;
  19. return 0;
  20. }
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
My owner is (nil)