2

Is it possible or helpful to employ move semantics when preforming constructor injection?

If so, is Hypodermic setup to allow this?

eigen_enthused
  • 525
  • 6
  • 17

1 Answers1

2

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.

mister why
  • 1,967
  • 11
  • 33