My favourite topic! I am glad that people are still thinking about automated DI in C++. I am sure the new standards make a lot of things easier. This library looks like a cool experiment and I hope the author continues to move in this direction.<p>Here is my version: <a href="http://bitbucket.org/cheez/dicpp" rel="nofollow">http://bitbucket.org/cheez/dicpp</a><p>With the following caveats:<p><pre><code> * It is not very cool
* It works really well for my uses
* It is not as efficient as the compile-time ones
</code></pre>
WRT efficiency, 99% of DI is done at application startup and you can easily make that efficient enough by delaying instantiations until you actually need them. The bottleneck at startup so far has never been the library itself.<p>I continue to look for one that allows me to create compiler firewalls so I can use <i>it</i> instead of my own.<p>Alternatively, if someone wants to give me tips to avoid the hideous DI_CONSTRUCTOR (see <a href="https://bitbucket.org/cheez/dicpp/src/HEAD/lib/examples/stockquote/StockQuoteApp.hpp#cl-15" rel="nofollow">https://bitbucket.org/cheez/dicpp/src/HEAD/lib/examples/stoc...</a>) I'm all ears.<p>There was one posted on the Boost list not so long ago which was VERY promising but I haven't managed to get around to using it yet.
Can someone explain what exactly the library does? All I got from the description is something about a way of building an argument list, and then how it is possible to fulfill some dependencies with factories or make methods or something.
The source code is here, interesting if you enjoy c++14 meta programming: <a href="https://github.com/matt-42/iod/blob/master/iod/di.hh" rel="nofollow">https://github.com/matt-42/iod/blob/master/iod/di.hh</a>