MCPcopy Create free account
hub / github.com/boost-ext/di / create_singletons_eagerly_impl

Function create_singletons_eagerly_impl

example/eager_singletons.cpp:36–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34template <class TDependency, class TInjector,
35 std::enable_if_t<std::is_same<typename TDependency::scope, di::scopes::singleton>::value, int> = 0>
36void create_singletons_eagerly_impl(const di::aux::type<TDependency>&, const TInjector& injector) {
37 injector.template create<std::shared_ptr<typename TDependency::expected>>();
38}
39
40template <class TDependency, class TInjector,
41 std::enable_if_t<!std::is_same<typename TDependency::scope, di::scopes::singleton>::value, int> = 0>

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected