prog.cpp: In constructor 'Foo::Foo()':
prog.cpp:18:19: error: no matching function for call to 'Bar<Foo>::Bar(Foo*)'
Foo() : bar(this) {};
^
prog.cpp:18:19: note: candidates are:
prog.cpp:8:3: note: Bar<C>::Bar(C&) [with C = Foo]
Bar(C& c) : _c(c) {};
^
prog.cpp:8:3: note: no known conversion for argument 1 from 'Foo*' to 'Foo&'
prog.cpp:5:7: note: Bar<Foo>::Bar(const Bar<Foo>&)
class Bar
^
prog.cpp:5:7: note: no known conversion for argument 1 from 'Foo*' to 'const Bar<Foo>&'