Fruit
Fruit, a dependency injection framework for C++
...Instead of relying on runtime string keys or service locators, bindings are expressed with templates and policy objects that the compiler verifies. It supports constructor injection, assisted injection for factory patterns, scoping (singleton vs. per-request), and provider chains while keeping overhead minimal. Modules declare provided interfaces and requirements, and the injector ensures the whole graph is complete before you ship, eliminating many runtime surprises. Because bindings are ordinary C++ code, they integrate naturally with headers, visibility rules, and link-time optimization. ...