Is it possible or helpful to employ move semantics when preforming constructor injection?
If so, is Hypodermic setup to allow this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Hypodermic can automatically use move constructors, it can spare you the cost of updating the reference counter of your dependencies.
You have nothing special to do but provinding a move constructor of the concerned object.
For now, Hypodermic cannot resolve an object providing both version of its constructor (move vs non-move), that is, the compiler will complain about ambigous call.