fork(1) download
  1. struct Bar
  2. {
  3. };
  4.  
  5. template<typename T>
  6. class Foo
  7. {
  8. Foo(Foo& Rhs);
  9. Foo& operator= (Foo& Rhs);
  10.  
  11. Foo(Foo const& Rhs);
  12. Foo& operator= (Foo const& Rhs);
  13.  
  14. public:
  15. Foo(Bar const& Rhs)
  16. {
  17. }
  18. };
  19.  
  20. int main()
  21. {
  22. Foo<int> MyFoo = Bar();
  23. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:11:2: error: ‘Foo<T>::Foo(const Foo<T>&) [with T = int]’ is private
  Foo(Foo const& Rhs);
  ^
prog.cpp:22:23: error: within this context
  Foo<int> MyFoo = Bar();
                       ^
stdout
Standard output is empty