Skip to content

Commit

Permalink
[core] get_impl returns auto
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztof-jusiak committed Jul 6, 2016
1 parent 1714b5c commit ab5ce15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include/boost/di.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2196,11 +2196,11 @@ struct provider<aux::pair<T, aux::pair<TInitialization, TList<TCtor...>>>, TName
return TInjector::config::provider(injector_).template get<T>(TInitialization{}, memory, static_cast<TArgs&&>(args)...);
}
template <class TMemory, class... TArgs, __BOOST_DI_REQUIRES(!is_creatable<TMemory, TArgs...>::value) = 0>
T* get_impl(const TMemory&, TArgs&&...) const {
auto get_impl(const TMemory&, TArgs&&...) const {
#if (BOOST_DI_CFG_DIAGNOSTICS_LEVEL > 0)
return concepts::creatable_error<TInitialization, TName, T*, TArgs...>();
#else
return {};
return nullptr;
#endif
}
const TInjector* injector_;
Expand Down
4 changes: 2 additions & 2 deletions include/boost/di/core/provider.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ struct provider<aux::pair<T, aux::pair<TInitialization, TList<TCtor...>>>, TName
}

template <class TMemory, class... TArgs, __BOOST_DI_REQUIRES(!is_creatable<TMemory, TArgs...>::value) = 0>
T* get_impl(const TMemory&, TArgs&&...) const {
auto get_impl(const TMemory&, TArgs&&...) const {
#if (BOOST_DI_CFG_DIAGNOSTICS_LEVEL > 0) // __pph__
return concepts::creatable_error<TInitialization, TName, T*, TArgs...>();
#else // __pph__
return {};
return nullptr;
#endif // __pph__
}

Expand Down

0 comments on commit ab5ce15

Please sign in to comment.