You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Attempting to use container.service<> on a service that implements autowire_service, will result in copy of the object rather than move since its using single_service instead of service.
I confirm the issue. The workaround is to use kgr::service<System2, kgr::autowire> or your alias. This is caused by the alias autowire_service pointing to the wrong type.
Describe the bug
Attempting to use
container.service<>
on a service that implementsautowire_service
, will result in copy of the object rather than move since its usingsingle_service
instead ofservice
.kangaru/include/kangaru/autowire.hpp
Lines 169 to 173 in ab498eb
To Reproduce
1- Create
main.cpp
with the following content:Expected behavior
The program should not make copies of the service but instead move it around
the output for the previous sample:
Desktop (please complete the following information):
Additional context
Another note i've noticed is that it moves the object two times instead of once.
The text was updated successfully, but these errors were encountered: