Forráskód Böngészése

stl: std::unique_ptr

skypjack 1 hónapja
szülő
commit
ddeea943f2

+ 2 - 2
src/entt/core/memory.hpp

@@ -82,7 +82,7 @@ struct allocation_deleter: private Allocator {
 };
 
 /**
- * @brief Allows `std::unique_ptr` to use allocators (waiting for C++20).
+ * @brief Allows `stl::unique_ptr` to use allocators (waiting for C++20).
  * @tparam Type Type of object to allocate for and to construct.
  * @tparam Allocator Type of allocator used to manage memory and elements.
  * @tparam Args Types of arguments to use to construct the object.
@@ -108,7 +108,7 @@ constexpr auto allocate_unique(Allocator &allocator, Args &&...args) {
         ENTT_THROW;
     }
 
-    return std::unique_ptr<Type, allocation_deleter<allocator_type>>{ptr, alloc};
+    return stl::unique_ptr<Type, allocation_deleter<allocator_type>>{ptr, alloc};
 }
 
 /*! @cond ENTT_INTERNAL */

+ 1 - 1
src/entt/meta/context.hpp

@@ -15,7 +15,7 @@ namespace internal {
 struct meta_type_node;
 
 struct meta_context {
-    using container_type = dense_map<id_type, std::unique_ptr<meta_type_node>, stl::identity>;
+    using container_type = dense_map<id_type, stl::unique_ptr<meta_type_node>, stl::identity>;
 
     container_type bucket;
 

+ 2 - 2
src/entt/meta/node.hpp

@@ -111,7 +111,7 @@ struct meta_func_node {
     const meta_type_node &(*ret)(const meta_context &) noexcept {};
     meta_type (*arg)(const meta_ctx &, const size_type) noexcept {};
     meta_any (*invoke)(meta_handle, meta_any *const){};
-    std::unique_ptr<meta_func_node> next;
+    stl::unique_ptr<meta_func_node> next;
     meta_custom_node custom{};
 };
 
@@ -145,7 +145,7 @@ struct meta_type_node {
     meta_any (*from_void)(const meta_ctx &, void *, const void *){};
     meta_template_node templ{};
     meta_custom_node custom{};
-    std::unique_ptr<meta_type_descriptor> details{};
+    stl::unique_ptr<meta_type_descriptor> details{};
 };
 
 template<typename Type, typename Value>

+ 2 - 2
src/entt/meta/pointer.hpp

@@ -19,13 +19,13 @@ struct is_meta_pointer_like<std::shared_ptr<Type>>
     : stl::true_type {};
 
 /**
- * @brief Makes `std::unique_ptr`s of any type pointer-like types for the meta
+ * @brief Makes `stl::unique_ptr`s of any type pointer-like types for the meta
  * system.
  * @tparam Type Element type.
  * @tparam Args Other arguments.
  */
 template<typename Type, typename... Args>
-struct is_meta_pointer_like<std::unique_ptr<Type, Args...>>
+struct is_meta_pointer_like<stl::unique_ptr<Type, Args...>>
     : stl::true_type {};
 
 /**

+ 1 - 0
src/entt/stl/memory.hpp

@@ -10,6 +10,7 @@ namespace entt::stl {
 
 using std::make_unique;
 using std::pointer_traits;
+using std::unique_ptr;
 
 } // namespace entt::stl