?
Danke Camper, stimmt natürlich, da hab ich etwas gepennt. Aber diese Korrektur ändert nichts, der Fehler bleibt bestehen:
test.cpp: In instantiation of 'X::wire(const D& ...)::<lambda()> [with T = C; D = {D<A>, D<B>}]':
test.cpp:62:40: required from 'struct X::wire(const D& ...) [with T = C; D = {D<A>, D<B>}]::<lambda()>'
test.cpp:63:9: required from 'void X::wire(const D& ...) [with T = C; D = {D<A>, D<B>}]'
test.cpp:87:28: required from here
test.cpp:63:9: error: no matching function for call to 'C::C(std::shared_ptr<D<A> >, std::shared_ptr<D<B> >)'
};
^
test.cpp:63:9: note: candidates are:
test.cpp:77:5: note: C::C(std::shared_ptr<A>, std::shared_ptr<B>)
C(std::shared_ptr<A> a, std::shared_ptr<B> b)
^
test.cpp:77:5: note: no known conversion for argument 1 from 'std::shared_ptr<D<A> >' to 'std::shared_ptr<A>'
test.cpp:75:8: note: C::C(const C&)
struct C
^
test.cpp:75:8: note: candidate expects 1 argument, 2 provided
test.cpp:75:8: note: C::C(C&&)
test.cpp:75:8: note: candidate expects 1 argument, 2 provided
test.cpp: In instantiation of 'std::shared_ptr<_Tp1> X::resolve(const D&) [with D = D<A>]':
test.cpp:63:9: required from 'X::wire(const D& ...)::<lambda()> [with T = C; D = {D<A>, D<B>}]'
test.cpp:62:40: required from 'struct X::wire(const D& ...) [with T = C; D = {D<A>, D<B>}]::<lambda()>'
test.cpp.cpp:63:9: required from 'void X::wire(const D& ...) [with T = C; D = {D<A>, D<B>}]'
test.cpp:87:28: required from here
test.cpp:69:35: error: passing 'const D<A>' as 'this' argument of 'std::shared_ptr<_Tp1> D<T>::resolve() [with T = A]' discards qualifiers [-fpermissive]
return dependency.resolve();
^
test.cpp:69:35: error: could not convert 'D<T>::resolve() [with T = A]()' from 'std::shared_ptr<A>' to 'std::shared_ptr<D<A> >'
test.cpp: In instantiation of 'std::shared_ptr<_Tp1> X::resolve(const D&) [with D = D<B>]':
test.cpp:63:9: required from 'X::wire(const D& ...)::<lambda()> [with T = C; D = {D<A>, D<B>}]'
test.cpp:62:40: required from 'struct X::wire(const D& ...) [with T = C; D = {D<A>, D<B>}]::<lambda()>'
test.cpp:63:9: required from 'void X::wire(const D& ...) [with T = C; D = {D<A>, D<B>}]'
test.cpp:87:28: required from here
c:/binrev/repository/ioc-deps/src/signals.cpp:69:35: error: passing 'const D<B>' as 'this' argument of 'std::shared_ptr<_Tp1> D<T>::resolve() [with T = B]' discards qualifiers [-fpermissive]
test.cpp:69:35: error: could not convert 'D<T>::resolve() [with T = B]()' from 'std::shared_ptr<B>' to 'std::shared_ptr<D<B> >'
make[2]: *** [CMakeFiles/signals.dir/src/signals.cpp.obj] Error 1
make[1]: *** [CMakeFiles/signals.dir/all] Error 2
make: *** [all] Error 2