fork(1) download
  1. #include <iostream>
  2. #include <memory>
  3.  
  4. class Base
  5. {
  6. public:
  7. Base() {}
  8. };
  9.  
  10. class Derived : public Base
  11. {
  12. public:
  13. Derived() {}
  14. Derived(std::initializer_list<std::pair<int, std::shared_ptr<Base>>>) {}
  15. };
  16.  
  17. int main(int argc, char ** argv)
  18. {
  19. auto example = new Derived({
  20. { 0, std::make_shared<Derived>() }
  21. });
  22.  
  23. return 0;
  24. }
Success #stdin #stdout 0s 3424KB
stdin
Standard input is empty
stdout
Standard output is empty