stl: std::make_shared
This commit is contained in:
@@ -101,7 +101,7 @@ public:
|
||||
template<stl::derived_from<Service> Type = Service, typename... Args>
|
||||
requires stl::constructible_from<Type, Args...>
|
||||
static Service &emplace(Args &&...args) {
|
||||
service = std::make_shared<Type>(stl::forward<Args>(args)...);
|
||||
service = stl::make_shared<Type>(stl::forward<Args>(args)...);
|
||||
return *service;
|
||||
}
|
||||
|
||||
|
||||
@@ -534,7 +534,7 @@ public:
|
||||
*/
|
||||
template<typename Value, typename... Args>
|
||||
meta_factory custom(Args &&...args) {
|
||||
base_type::custom(internal::meta_custom_node{type_id<Value>().hash(), std::make_shared<Value>(stl::forward<Args>(args)...)});
|
||||
base_type::custom(internal::meta_custom_node{type_id<Value>().hash(), stl::make_shared<Value>(stl::forward<Args>(args)...)});
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -24,7 +24,7 @@ struct resource_loader {
|
||||
*/
|
||||
template<typename... Args>
|
||||
result_type operator()(Args &&...args) const {
|
||||
return std::make_shared<Type>(stl::forward<Args>(args)...);
|
||||
return stl::make_shared<Type>(stl::forward<Args>(args)...);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ using std::allocator;
|
||||
using std::allocator_arg;
|
||||
using std::allocator_arg_t;
|
||||
using std::allocator_traits;
|
||||
using std::make_shared;
|
||||
using std::make_unique;
|
||||
using std::pointer_traits;
|
||||
using std::shared_ptr;
|
||||
|
||||
Reference in New Issue
Block a user