stl: std::make_shared

This commit is contained in:
skypjack
2026-04-17 09:15:13 +02:00
parent 750b450cd2
commit b451c43058
4 changed files with 4 additions and 3 deletions

View File

@@ -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;
}

View File

@@ -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;
}
};

View File

@@ -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)...);
}
};

View File

@@ -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;