fork(2) download
  1. #include <memory>
  2.  
  3. struct Foo { explicit Foo(double) {} };
  4.  
  5. std::unique_ptr<Foo> OtherMethod(float arg)
  6. {
  7. Foo *ptr = new Foo(arg);
  8. std::unique_ptr<Foo> result;
  9. result.reset(ptr);
  10. return result;
  11. }
  12.  
  13. int main()
  14. {
  15. OtherMethod(2.0/4.5);
  16. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
Standard output is empty