fork(4) download
#include <memory>

template <typename T>
class CList {
private:
  CList(const CList& rhs) {}
};

struct hoge {
};

std::unique_ptr<CList<hoge> > foo()
{
  std::unique_ptr<CList<hoge> > baz(new CList<hoge>);
  return baz;
}

int main()
{
  std::unique_ptr<CList<hoge> > bar = foo();
}
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘std::unique_ptr<CList<hoge> > foo()’:
prog.cpp:14:41: error: no matching function for call to ‘CList<hoge>::CList()’
   std::unique_ptr<CList<hoge> > baz(new CList<hoge>);
                                         ^
prog.cpp:14:41: note: candidate is:
prog.cpp:6:3: note: CList<T>::CList(const CList<T>&) [with T = hoge]
   CList(const CList& rhs) {}
   ^
prog.cpp:6:3: note:   candidate expects 1 argument, 0 provided
stdout
Standard output is empty