fork download
  1. #include <memory>
  2.  
  3. template <typename T>
  4. class CList {
  5. public:
  6. CList(){}
  7. private:
  8. CList(const CList& rhs) {}
  9. };
  10.  
  11. struct hoge {
  12. };
  13.  
  14. std::unique_ptr<CList<hoge> > foo()
  15. {
  16. std::unique_ptr<CList<hoge> > baz(new CList<hoge>);
  17. return baz;
  18. }
  19.  
  20. int main()
  21. {
  22. std::unique_ptr<CList<hoge> > bar = foo();
  23. }
  24.  
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
Standard output is empty