Просмотр исходного кода

stl: moved some type traits here and there

skypjack 1 день назад
Родитель
Сommit
17953cb28a

+ 1 - 1
src/entt/container/dense_map.hpp

@@ -235,7 +235,7 @@ class dense_map {
 
     using node_type = internal::dense_map_node<Key, Type>;
     using alloc_traits = std::allocator_traits<Allocator>;
-    static_assert(std::is_same_v<typename alloc_traits::value_type, std::pair<const Key, Type>>, "Invalid value type");
+    static_assert(stl::is_same_v<typename alloc_traits::value_type, std::pair<const Key, Type>>, "Invalid value type");
     using sparse_container_type = stl::vector<std::size_t, typename alloc_traits::template rebind_alloc<std::size_t>>;
     using packed_container_type = stl::vector<node_type, typename alloc_traits::template rebind_alloc<node_type>>;
 

+ 2 - 2
src/entt/container/dense_set.hpp

@@ -199,7 +199,7 @@ class dense_set {
 
     using node_type = std::pair<std::size_t, Type>;
     using alloc_traits = std::allocator_traits<Allocator>;
-    static_assert(std::is_same_v<typename alloc_traits::value_type, Type>, "Invalid value type");
+    static_assert(stl::is_same_v<typename alloc_traits::value_type, Type>, "Invalid value type");
     using sparse_container_type = stl::vector<std::size_t, typename alloc_traits::template rebind_alloc<std::size_t>>;
     using packed_container_type = stl::vector<node_type, typename alloc_traits::template rebind_alloc<node_type>>;
 
@@ -544,7 +544,7 @@ public:
      */
     template<typename... Args>
     std::pair<iterator, bool> emplace(Args &&...args) {
-        if constexpr(((sizeof...(Args) == 1u) && ... && std::is_same_v<std::decay_t<Args>, value_type>)) {
+        if constexpr(((sizeof...(Args) == 1u) && ... && stl::is_same_v<std::decay_t<Args>, value_type>)) {
             return insert_or_do_nothing(std::forward<Args>(args)...);
         } else {
             auto &node = packed.first().emplace_back(std::piecewise_construct, stl::make_tuple(packed.first().size()), stl::forward_as_tuple(std::forward<Args>(args)...));

+ 4 - 4
src/entt/core/any.hpp

@@ -127,7 +127,7 @@ class basic_any: private internal::basic_any_storage<Len, Align> {
 
     template<typename Type, typename... Args>
     void initialize([[maybe_unused]] Args &&...args) {
-        using plain_type = std::remove_cvref_t<Type>;
+        using plain_type = stl::remove_cvref_t<Type>;
 
         vtable = basic_vtable<plain_type>;
         underlying_type = type_hash<plain_type>::value();
@@ -224,7 +224,7 @@ public:
      * @param value An instance of an object to use to initialize the wrapper.
      */
     template<typename Type>
-    requires (!std::same_as<std::remove_cvref_t<Type>, basic_any>)
+    requires (!std::same_as<stl::remove_cvref_t<Type>, basic_any>)
     basic_any(Type &&value)
         : basic_any{std::in_place_type<std::decay_t<Type>>, std::forward<Type>(value)} {}
 
@@ -309,7 +309,7 @@ public:
      * @return This any object.
      */
     template<typename Type>
-    requires (!std::same_as<std::remove_cvref_t<Type>, basic_any>)
+    requires (!std::same_as<stl::remove_cvref_t<Type>, basic_any>)
     basic_any &operator=(Type &&value) {
         emplace<std::decay_t<Type>>(std::forward<Type>(value));
         return *this;
@@ -560,7 +560,7 @@ template<typename Type, std::size_t Len, std::size_t Align>
 template<typename Type, std::size_t Len, std::size_t Align>
 // NOLINTNEXTLINE(cppcoreguidelines-rvalue-reference-param-not-moved)
 [[nodiscard]] std::remove_const_t<Type> any_cast(basic_any<Len, Align> &&data) noexcept {
-    if constexpr(std::is_copy_constructible_v<std::remove_cvref_t<Type>>) {
+    if constexpr(std::is_copy_constructible_v<stl::remove_cvref_t<Type>>) {
         if(auto *const instance = any_cast<std::remove_reference_t<Type>>(&data); instance) {
             return static_cast<Type>(std::move(*instance));
         }

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

@@ -25,7 +25,7 @@ struct compressed_pair_element {
 
     template<typename Arg>
     constexpr compressed_pair_element(Arg &&arg) noexcept(std::is_nothrow_constructible_v<Type, Arg>)
-    requires (!std::same_as<std::remove_cvref_t<Arg>, compressed_pair_element>)
+    requires (!std::same_as<stl::remove_cvref_t<Arg>, compressed_pair_element>)
         : value{std::forward<Arg>(arg)} {}
 
     template<typename... Args, std::size_t... Index>
@@ -57,7 +57,7 @@ struct compressed_pair_element<Type, Tag>: Type {
 
     template<typename Arg>
     constexpr compressed_pair_element(Arg &&arg) noexcept(std::is_nothrow_constructible_v<base_type, Arg>)
-    requires (!std::same_as<std::remove_cvref_t<Arg>, compressed_pair_element>)
+    requires (!std::same_as<stl::remove_cvref_t<Arg>, compressed_pair_element>)
         : base_type{std::forward<Arg>(arg)} {}
 
     template<typename... Args, std::size_t... Index>

+ 1 - 1
src/entt/core/concepts.hpp

@@ -10,7 +10,7 @@ namespace entt {
  * @tparam Type Type to check.
  */
 template<typename Type>
-concept cvref_unqualified = std::is_same_v<std::remove_cvref_t<Type>, Type>;
+concept cvref_unqualified = stl::is_same_v<stl::remove_cvref_t<Type>, Type>;
 
 } // namespace entt
 

+ 3 - 3
src/entt/core/ident.hpp

@@ -17,7 +17,7 @@ template<typename... Type>
 class ident {
     template<typename Curr, std::size_t... Index>
     [[nodiscard]] static ENTT_CONSTEVAL id_type get(std::index_sequence<Index...>) noexcept {
-        return (0 + ... + (std::is_same_v<Curr, type_list_element_t<Index, type_list<std::decay_t<Type>...>>> ? id_type{Index} : id_type{}));
+        return (0 + ... + (stl::is_same_v<Curr, type_list_element_t<Index, type_list<std::decay_t<Type>...>>> ? id_type{Index} : id_type{}));
     }
 
 public:
@@ -26,8 +26,8 @@ public:
 
     /*! @brief Statically generated unique identifier for the given type. */
     template<typename Curr>
-    requires (std::is_same_v<std::remove_cvref_t<Curr>, Type> || ...)
-    static constexpr value_type value = get<std::remove_cvref_t<Curr>>(std::index_sequence_for<Type...>{});
+    requires (stl::is_same_v<stl::remove_cvref_t<Curr>, Type> || ...)
+    static constexpr value_type value = get<stl::remove_cvref_t<Curr>>(std::index_sequence_for<Type...>{});
 };
 
 } // namespace entt

+ 1 - 1
src/entt/core/tuple.hpp

@@ -83,7 +83,7 @@ struct forward_apply: private Func {
  * @tparam Func Type of underlying invocable object.
  */
 template<typename Func>
-forward_apply(Func) -> forward_apply<std::remove_cvref_t<Func>>;
+forward_apply(Func) -> forward_apply<stl::remove_cvref_t<Func>>;
 
 } // namespace entt
 

+ 6 - 6
src/entt/core/type_info.hpp

@@ -147,9 +147,9 @@ struct type_info final {
     template<typename Type>
     // NOLINTBEGIN(modernize-use-transparent-functors)
     constexpr type_info(std::in_place_type_t<Type>) noexcept
-        : seq{type_index<std::remove_cvref_t<Type>>::value()},
-          identifier{type_hash<std::remove_cvref_t<Type>>::value()},
-          alias{type_name<std::remove_cvref_t<Type>>::value()} {}
+        : seq{type_index<stl::remove_cvref_t<Type>>::value()},
+          identifier{type_hash<stl::remove_cvref_t<Type>>::value()},
+          alias{type_name<stl::remove_cvref_t<Type>>::value()} {}
     // NOLINTEND(modernize-use-transparent-functors)
 
     /**
@@ -213,18 +213,18 @@ private:
  */
 template<typename Type>
 [[nodiscard]] const type_info &type_id() noexcept {
-    if constexpr(std::is_same_v<Type, std::remove_cvref_t<Type>>) {
+    if constexpr(stl::is_same_v<Type, stl::remove_cvref_t<Type>>) {
         static const type_info instance{std::in_place_type<Type>};
         return instance;
     } else {
-        return type_id<std::remove_cvref_t<Type>>();
+        return type_id<stl::remove_cvref_t<Type>>();
     }
 }
 
 /*! @copydoc type_id */
 template<typename Type>
 [[nodiscard]] const type_info &type_id(const Type &) noexcept {
-    return type_id<std::remove_cvref_t<Type>>();
+    return type_id<stl::remove_cvref_t<Type>>();
 }
 
 } // namespace entt

+ 3 - 3
src/entt/core/type_traits.hpp

@@ -240,7 +240,7 @@ struct type_list_unique;
 
 template<typename First, typename... Other, typename... Type>
 struct type_list_unique<type_list<First, Other...>, Type...>
-    : std::conditional_t<(std::is_same_v<First, Type> || ...), type_list_unique<type_list<Other...>, Type...>, type_list_unique<type_list<Other...>, Type..., First>> {};
+    : std::conditional_t<(stl::is_same_v<First, Type> || ...), type_list_unique<type_list<Other...>, Type...>, type_list_unique<type_list<Other...>, Type..., First>> {};
 
 template<typename... Type>
 struct type_list_unique<type_list<>, Type...> {
@@ -283,7 +283,7 @@ struct type_list_contains;
  */
 template<typename... Type, typename Other>
 struct type_list_contains<type_list<Type...>, Other>
-    : std::bool_constant<(std::is_same_v<Type, Other> || ...)> {};
+    : std::bool_constant<(stl::is_same_v<Type, Other> || ...)> {};
 
 /**
  * @brief Helper variable template.
@@ -766,7 +766,7 @@ template<typename Type>
             return maybe_equality_comparable<Type>(0);
         }
     } else if constexpr(has_value_type<Type>::value) {
-        if constexpr(is_iterator_v<Type> || std::is_same_v<typename Type::value_type, Type> || dispatch_is_equality_comparable<typename Type::value_type>()) {
+        if constexpr(is_iterator_v<Type> || stl::is_same_v<typename Type::value_type, Type> || dispatch_is_equality_comparable<typename Type::value_type>()) {
             return maybe_equality_comparable<Type>(0);
         } else {
             return false;

+ 6 - 6
src/entt/entity/handle.hpp

@@ -194,7 +194,7 @@ public:
     template<typename Type, typename... Args>
     // NOLINTNEXTLINE(modernize-use-nodiscard)
     decltype(auto) emplace(Args &&...args) const {
-        static_assert(((sizeof...(Scope) == 0) || ... || std::is_same_v<Type, Scope>), "Invalid type");
+        static_assert(((sizeof...(Scope) == 0) || ... || stl::is_same_v<Type, Scope>), "Invalid type");
         return owner_or_assert().template emplace<Type>(entt, std::forward<Args>(args)...);
     }
 
@@ -207,7 +207,7 @@ public:
      */
     template<typename Type, typename... Args>
     decltype(auto) emplace_or_replace(Args &&...args) const {
-        static_assert(((sizeof...(Scope) == 0) || ... || std::is_same_v<Type, Scope>), "Invalid type");
+        static_assert(((sizeof...(Scope) == 0) || ... || stl::is_same_v<Type, Scope>), "Invalid type");
         return owner_or_assert().template emplace_or_replace<Type>(entt, std::forward<Args>(args)...);
     }
 
@@ -220,7 +220,7 @@ public:
      */
     template<typename Type, typename... Func>
     decltype(auto) patch(Func &&...func) const {
-        static_assert(((sizeof...(Scope) == 0) || ... || std::is_same_v<Type, Scope>), "Invalid type");
+        static_assert(((sizeof...(Scope) == 0) || ... || stl::is_same_v<Type, Scope>), "Invalid type");
         return owner_or_assert().template patch<Type>(entt, std::forward<Func>(func)...);
     }
 
@@ -233,7 +233,7 @@ public:
      */
     template<typename Type, typename... Args>
     decltype(auto) replace(Args &&...args) const {
-        static_assert(((sizeof...(Scope) == 0) || ... || std::is_same_v<Type, Scope>), "Invalid type");
+        static_assert(((sizeof...(Scope) == 0) || ... || stl::is_same_v<Type, Scope>), "Invalid type");
         return owner_or_assert().template replace<Type>(entt, std::forward<Args>(args)...);
     }
 
@@ -300,7 +300,7 @@ public:
      */
     template<typename Type, typename... Args>
     [[nodiscard]] decltype(auto) get_or_emplace(Args &&...args) const {
-        static_assert(((sizeof...(Scope) == 0) || ... || std::is_same_v<Type, Scope>), "Invalid type");
+        static_assert(((sizeof...(Scope) == 0) || ... || stl::is_same_v<Type, Scope>), "Invalid type");
         return owner_or_assert().template get_or_emplace<Type>(entt, std::forward<Args>(args)...);
     }
 
@@ -353,7 +353,7 @@ public:
      */
     template<typename Other, typename... Args>
     operator basic_handle<Other, Args...>() const noexcept {
-        static_assert(std::is_same_v<Other, Registry> || std::is_same_v<std::remove_const_t<Other>, Registry>, "Invalid conversion between different handles");
+        static_assert(stl::is_same_v<Other, Registry> || stl::is_same_v<std::remove_const_t<Other>, Registry>, "Invalid conversion between different handles");
         static_assert((sizeof...(Scope) == 0 || ((sizeof...(Args) != 0 && sizeof...(Args) <= sizeof...(Scope)) && ... && (type_list_contains_v<type_list<Scope...>, Args>))), "Invalid conversion between different handles");
         return owner ? basic_handle<Other, Args...>{*owner, entt} : basic_handle<Other, Args...>{};
     }

+ 3 - 3
src/entt/entity/mixin.hpp

@@ -88,7 +88,7 @@ private:
 
     void pop_all() final {
         if(auto &reg = owner_or_assert(); !destruction.empty()) {
-            if constexpr(std::is_same_v<typename underlying_type::element_type, entity_type>) {
+            if constexpr(stl::is_same_v<typename underlying_type::element_type, entity_type>) {
                 for(typename underlying_type::size_type pos{}, last = underlying_type::free_list(); pos < last; ++pos) {
                     destruction.publish(reg, underlying_type::base_type::operator[](pos));
                 }
@@ -121,7 +121,7 @@ private:
     void bind_any(any value) noexcept final {
         owner = any_cast<basic_registry_type>(&value);
 
-        if constexpr(!std::is_same_v<registry_type, basic_registry_type>) {
+        if constexpr(!stl::is_same_v<registry_type, basic_registry_type>) {
             if(owner == nullptr) {
                 owner = any_cast<registry_type>(&value);
             }
@@ -414,7 +414,7 @@ private:
     void bind_any(any value) noexcept final {
         owner = any_cast<basic_registry_type>(&value);
 
-        if constexpr(!std::is_same_v<registry_type, basic_registry_type>) {
+        if constexpr(!stl::is_same_v<registry_type, basic_registry_type>) {
             if(owner == nullptr) {
                 owner = any_cast<registry_type>(&value);
             }

+ 2 - 2
src/entt/entity/organizer.hpp

@@ -87,7 +87,7 @@ struct resource_traits<Registry, type_list<Args...>, type_list<Req...>> {
     using args = type_list<std::remove_const_t<Args>...>;
     using ro = type_list_cat_t<typename unpack_type<Args, type_list<Req...>>::ro..., typename unpack_type<Req, type_list<>>::ro...>;
     using rw = type_list_cat_t<typename unpack_type<Args, type_list<Req...>>::rw..., typename unpack_type<Req, type_list<>>::rw...>;
-    static constexpr auto sync_point = (std::is_same_v<Args, Registry> || ...);
+    static constexpr auto sync_point = (stl::is_same_v<Args, Registry> || ...);
 };
 
 template<typename Registry, typename... Req, typename Ret, typename... Args>
@@ -135,7 +135,7 @@ class basic_organizer final {
 
     template<typename Type>
     [[nodiscard]] static decltype(auto) extract(Registry &reg) {
-        if constexpr(std::is_same_v<Type, Registry>) {
+        if constexpr(stl::is_same_v<Type, Registry>) {
             return reg;
         } else if constexpr(internal::is_view_v<Type>) {
             return static_cast<Type>(as_view{reg});

+ 6 - 6
src/entt/entity/registry.hpp

@@ -154,7 +154,7 @@ public:
 
     template<typename Type>
     Type &insert_or_assign(const id_type id, Type &&value) {
-        return any_cast<std::remove_cvref_t<Type> &>(ctx.insert_or_assign(id, std::forward<Type>(value)).first->second);
+        return any_cast<stl::remove_cvref_t<Type> &>(ctx.insert_or_assign(id, std::forward<Type>(value)).first->second);
     }
 
     template<typename Type>
@@ -212,7 +212,7 @@ template<typename Entity, typename Allocator>
 class basic_registry {
     using base_type = basic_sparse_set<Entity, Allocator>;
     using alloc_traits = std::allocator_traits<Allocator>;
-    static_assert(std::is_same_v<typename alloc_traits::value_type, Entity>, "Invalid value type");
+    static_assert(stl::is_same_v<typename alloc_traits::value_type, Entity>, "Invalid value type");
     // std::shared_ptr because of its type erased allocator which is useful here
     using pool_container_type = dense_map<id_type, std::shared_ptr<base_type>, stl::identity, std::equal_to<>, typename alloc_traits::template rebind_alloc<std::pair<const id_type, std::shared_ptr<base_type>>>>;
     using group_container_type = dense_map<id_type, std::shared_ptr<internal::group_descriptor>, stl::identity, std::equal_to<>, typename alloc_traits::template rebind_alloc<std::pair<const id_type, std::shared_ptr<internal::group_descriptor>>>>;
@@ -220,7 +220,7 @@ class basic_registry {
 
     template<cvref_unqualified Type>
     [[nodiscard]] auto &assure([[maybe_unused]] const id_type id = type_hash<Type>::value()) {
-        if constexpr(std::is_same_v<Type, entity_type>) {
+        if constexpr(stl::is_same_v<Type, entity_type>) {
             ENTT_ASSERT(id == type_hash<Type>::value(), "User entity storage not allowed");
             return entities;
         } else {
@@ -241,7 +241,7 @@ class basic_registry {
 
     template<cvref_unqualified Type>
     [[nodiscard]] const auto *assure([[maybe_unused]] const id_type id = type_hash<Type>::value()) const {
-        if constexpr(std::is_same_v<Type, entity_type>) {
+        if constexpr(stl::is_same_v<Type, entity_type>) {
             ENTT_ASSERT(id == type_hash<Type>::value(), "User entity storage not allowed");
             return &entities;
         } else {
@@ -695,7 +695,7 @@ public:
     size_type remove(It first, It last) {
         size_type count{};
 
-        if constexpr(std::is_same_v<It, typename common_type::iterator>) {
+        if constexpr(stl::is_same_v<It, typename common_type::iterator>) {
             std::array cpools{static_cast<common_type *>(&assure<Type>()), static_cast<common_type *>(&assure<Other>())...};
 
             for(auto from = cpools.begin(), to = cpools.end(); from != to; ++from) {
@@ -746,7 +746,7 @@ public:
      */
     template<typename Type, typename... Other, stl::input_iterator It>
     void erase(It first, It last) {
-        if constexpr(std::is_same_v<It, typename common_type::iterator>) {
+        if constexpr(stl::is_same_v<It, typename common_type::iterator>) {
             std::array cpools{static_cast<common_type *>(&assure<Type>()), static_cast<common_type *>(&assure<Other>())...};
 
             for(auto from = cpools.begin(), to = cpools.end(); from != to; ++from) {

+ 1 - 1
src/entt/entity/runtime_view.hpp

@@ -118,7 +118,7 @@ private:
 template<typename Type, typename Allocator>
 class basic_runtime_view {
     using alloc_traits = std::allocator_traits<Allocator>;
-    static_assert(std::is_same_v<typename alloc_traits::value_type, Type *>, "Invalid value type");
+    static_assert(stl::is_same_v<typename alloc_traits::value_type, Type *>, "Invalid value type");
     using container_type = stl::vector<Type *, Allocator>;
 
     [[nodiscard]] auto offset() const noexcept {

+ 10 - 10
src/entt/entity/snapshot.hpp

@@ -95,7 +95,7 @@ public:
 
             archive(static_cast<traits_type::entity_type>(storage->size()));
 
-            if constexpr(std::is_same_v<Type, entity_type>) {
+            if constexpr(stl::is_same_v<Type, entity_type>) {
                 archive(static_cast<traits_type::entity_type>(storage->free_list()));
 
                 for(auto first = base.rbegin(), last = base.rend(); first != last; ++first) {
@@ -135,7 +135,7 @@ public:
      */
     template<typename Type, typename Archive>
     const basic_snapshot &get(Archive &archive, stl::input_iterator auto first, stl::input_iterator auto last, const id_type id = type_hash<Type>::value()) const {
-        static_assert(!std::is_same_v<Type, entity_type>, "Entity types not supported");
+        static_assert(!stl::is_same_v<Type, entity_type>, "Entity types not supported");
 
         if(const auto *storage = reg->template storage<Type>(id); storage && !storage->empty()) {
             archive(static_cast<traits_type::entity_type>(stl::distance(first, last)));
@@ -226,7 +226,7 @@ public:
 
         archive(length);
 
-        if constexpr(std::is_same_v<Type, entity_type>) {
+        if constexpr(stl::is_same_v<Type, entity_type>) {
             typename traits_type::entity_type count{};
             entity_type placeholder{};
 
@@ -323,12 +323,12 @@ class basic_continuous_loader {
             using first_type = std::remove_const_t<typename std::decay_t<decltype(pair)>::first_type>;
             using second_type = std::decay_t<decltype(pair)>::second_type;
 
-            if constexpr(std::is_same_v<first_type, entity_type> && std::is_same_v<second_type, entity_type>) {
+            if constexpr(stl::is_same_v<first_type, entity_type> && stl::is_same_v<second_type, entity_type>) {
                 other.emplace(map(pair.first), map(pair.second));
-            } else if constexpr(std::is_same_v<first_type, entity_type>) {
+            } else if constexpr(stl::is_same_v<first_type, entity_type>) {
                 other.emplace(map(pair.first), std::move(pair.second));
             } else {
-                static_assert(std::is_same_v<second_type, entity_type>, "Neither the key nor the value are of entity type");
+                static_assert(stl::is_same_v<second_type, entity_type>, "Neither the key nor the value are of entity type");
                 other.emplace(std::move(pair.first), map(pair.second));
             }
         }
@@ -340,7 +340,7 @@ class basic_continuous_loader {
     template<typename Container>
     auto update(char, Container &container) -> decltype(typename Container::value_type{}, void()) {
         // vector like container
-        static_assert(std::is_same_v<typename Container::value_type, entity_type>, "Invalid value type");
+        static_assert(stl::is_same_v<typename Container::value_type, entity_type>, "Invalid value type");
 
         for(auto &&entt: container) {
             entt = map(entt);
@@ -349,9 +349,9 @@ class basic_continuous_loader {
 
     template<typename Component, typename Other, typename Member>
     void update([[maybe_unused]] Component &instance, [[maybe_unused]] Member Other::*member) {
-        if constexpr(!std::is_same_v<Component, Other>) {
+        if constexpr(!stl::is_same_v<Component, Other>) {
             return;
-        } else if constexpr(std::is_same_v<Member, entity_type>) {
+        } else if constexpr(stl::is_same_v<Member, entity_type>) {
             instance.*member = map(instance.*member);
         } else {
             // maybe a container? let's try...
@@ -416,7 +416,7 @@ public:
 
         archive(length);
 
-        if constexpr(std::is_same_v<Type, entity_type>) {
+        if constexpr(stl::is_same_v<Type, entity_type>) {
             typename traits_type::entity_type in_use{};
 
             storage.reserve(length);

+ 3 - 3
src/entt/entity/sparse_set.hpp

@@ -138,7 +138,7 @@ private:
 template<typename Entity, typename Allocator>
 class basic_sparse_set {
     using alloc_traits = std::allocator_traits<Allocator>;
-    static_assert(std::is_same_v<typename alloc_traits::value_type, Entity>, "Invalid value type");
+    static_assert(stl::is_same_v<typename alloc_traits::value_type, Entity>, "Invalid value type");
     using sparse_container_type = stl::vector<typename alloc_traits::pointer, typename alloc_traits::template rebind_alloc<typename alloc_traits::pointer>>;
     using packed_container_type = stl::vector<Entity, Allocator>;
     using traits_type = entt_traits<Entity>;
@@ -832,7 +832,7 @@ public:
      */
     template<stl::input_iterator It>
     void erase(It first, It last) {
-        if constexpr(std::is_same_v<It, basic_iterator>) {
+        if constexpr(stl::is_same_v<It, basic_iterator>) {
             pop(first, last);
         } else {
             for(; first != last; ++first) {
@@ -861,7 +861,7 @@ public:
     size_type remove(It first, It last) {
         size_type count{};
 
-        if constexpr(std::is_same_v<It, basic_iterator>) {
+        if constexpr(stl::is_same_v<It, basic_iterator>) {
             while(first != last) {
                 while(first != last && !contains(*first)) {
                     ++first;

+ 3 - 3
src/entt/entity/storage.hpp

@@ -208,7 +208,7 @@ private:
 template<typename Type, typename Entity, typename Allocator>
 class basic_storage: public basic_sparse_set<Entity, typename std::allocator_traits<Allocator>::template rebind_alloc<Entity>> {
     using alloc_traits = std::allocator_traits<Allocator>;
-    static_assert(std::is_same_v<typename alloc_traits::value_type, Type>, "Invalid value type");
+    static_assert(stl::is_same_v<typename alloc_traits::value_type, Type>, "Invalid value type");
     using container_type = stl::vector<typename alloc_traits::pointer, typename alloc_traits::template rebind_alloc<typename alloc_traits::pointer>>;
     using underlying_type = basic_sparse_set<Entity, typename alloc_traits::template rebind_alloc<Entity>>;
     using underlying_iterator = underlying_type::basic_iterator;
@@ -777,7 +777,7 @@ requires (component_traits<Type, Entity>::page_size == 0u)
 class basic_storage<Type, Entity, Allocator>
     : public basic_sparse_set<Entity, typename std::allocator_traits<Allocator>::template rebind_alloc<Entity>> {
     using alloc_traits = std::allocator_traits<Allocator>;
-    static_assert(std::is_same_v<typename alloc_traits::value_type, Type>, "Invalid value type");
+    static_assert(stl::is_same_v<typename alloc_traits::value_type, Type>, "Invalid value type");
     using traits_type = component_traits<Type, Entity>;
 
 public:
@@ -959,7 +959,7 @@ template<typename Entity, typename Allocator>
 class basic_storage<Entity, Entity, Allocator>
     : public basic_sparse_set<Entity, Allocator> {
     using alloc_traits = std::allocator_traits<Allocator>;
-    static_assert(std::is_same_v<typename alloc_traits::value_type, Entity>, "Invalid value type");
+    static_assert(stl::is_same_v<typename alloc_traits::value_type, Entity>, "Invalid value type");
     using underlying_iterator = basic_sparse_set<Entity, Allocator>::basic_iterator;
     using traits_type = entt_traits<Entity>;
 

+ 2 - 2
src/entt/entity/view.hpp

@@ -958,7 +958,7 @@ public:
      */
     template<typename Type = Get::element_type>
     [[nodiscard]] auto *storage() const noexcept {
-        static_assert(std::is_same_v<std::remove_const_t<Type>, typename Get::element_type>, "Invalid element type");
+        static_assert(stl::is_same_v<std::remove_const_t<Type>, typename Get::element_type>, "Invalid element type");
         return storage<0>();
     }
 
@@ -1017,7 +1017,7 @@ public:
      */
     template<typename Elem>
     [[nodiscard]] decltype(auto) get(const entity_type entt) const {
-        static_assert(std::is_same_v<std::remove_const_t<Elem>, typename Get::element_type>, "Invalid element type");
+        static_assert(stl::is_same_v<std::remove_const_t<Elem>, typename Get::element_type>, "Invalid element type");
         return get<0>(entt);
     }
 

+ 3 - 3
src/entt/graph/adjacency_matrix.hpp

@@ -87,7 +87,7 @@ private:
 template<std::derived_from<directed_tag> Category, typename Allocator>
 class adjacency_matrix {
     using alloc_traits = std::allocator_traits<Allocator>;
-    static_assert(std::is_same_v<typename alloc_traits::value_type, std::size_t>, "Invalid value type");
+    static_assert(stl::is_same_v<typename alloc_traits::value_type, std::size_t>, "Invalid value type");
     using container_type = stl::vector<std::size_t, typename alloc_traits::template rebind_alloc<std::size_t>>;
 
 public:
@@ -283,7 +283,7 @@ public:
     std::pair<edge_iterator, bool> insert(const vertex_type lhs, const vertex_type rhs) {
         const auto pos = lhs * vert + rhs;
 
-        if constexpr(std::is_same_v<graph_category, undirected_tag>) {
+        if constexpr(stl::is_same_v<graph_category, undirected_tag>) {
             const auto rev = rhs * vert + lhs;
             ENTT_ASSERT(matrix[pos] == matrix[rev], "Something went really wrong");
             matrix[rev] = 1u;
@@ -302,7 +302,7 @@ public:
     size_type erase(const vertex_type lhs, const vertex_type rhs) {
         const auto pos = lhs * vert + rhs;
 
-        if constexpr(std::is_same_v<graph_category, undirected_tag>) {
+        if constexpr(stl::is_same_v<graph_category, undirected_tag>) {
             const auto rev = rhs * vert + lhs;
             ENTT_ASSERT(matrix[pos] == matrix[rev], "Something went really wrong");
             matrix[rev] = 0u;

+ 1 - 1
src/entt/graph/flow.hpp

@@ -29,7 +29,7 @@ namespace entt {
 template<typename Allocator>
 class basic_flow {
     using alloc_traits = std::allocator_traits<Allocator>;
-    static_assert(std::is_same_v<typename alloc_traits::value_type, id_type>, "Invalid value type");
+    static_assert(stl::is_same_v<typename alloc_traits::value_type, id_type>, "Invalid value type");
     using task_container_type = dense_set<id_type, stl::identity, std::equal_to<>, typename alloc_traits::template rebind_alloc<id_type>>;
     using ro_rw_container_type = stl::vector<std::pair<std::size_t, bool>, typename alloc_traits::template rebind_alloc<std::pair<std::size_t, bool>>>;
     using deps_container_type = dense_map<id_type, ro_rw_container_type, stl::identity, std::equal_to<>, typename alloc_traits::template rebind_alloc<std::pair<const id_type, ro_rw_container_type>>>;

+ 15 - 15
src/entt/meta/factory.hpp

@@ -63,14 +63,14 @@ protected:
     void insert_or_assign(Type node) {
         state = mode::type;
 
-        if constexpr(std::is_same_v<Type, meta_base_node>) {
+        if constexpr(stl::is_same_v<Type, meta_base_node>) {
             auto *member = find_member(parent->details->base, node.id);
             member ? (*member = node) : parent->details->base.emplace_back(node);
-        } else if constexpr(std::is_same_v<Type, meta_conv_node>) {
+        } else if constexpr(stl::is_same_v<Type, meta_conv_node>) {
             auto *member = find_member(parent->details->conv, node.id);
             member ? (*member = node) : parent->details->conv.emplace_back(node);
         } else {
-            static_assert(std::is_same_v<Type, meta_ctor_node>, "Unexpected type");
+            static_assert(stl::is_same_v<Type, meta_ctor_node>, "Unexpected type");
             auto *member = find_member(parent->details->ctor, node.id);
             member ? (*member = node) : parent->details->ctor.emplace_back(node);
         }
@@ -237,7 +237,7 @@ public:
      */
     template<auto Candidate>
     auto conv() noexcept {
-        using conv_type = std::remove_cvref_t<std::invoke_result_t<decltype(Candidate), Type &>>;
+        using conv_type = stl::remove_cvref_t<std::invoke_result_t<decltype(Candidate), Type &>>;
         auto *const op = +[](const meta_ctx &area, const void *instance) { return forward_as_meta(area, std::invoke(Candidate, *static_cast<const Type *>(instance))); };
 
         base_type::insert_or_assign(
@@ -259,7 +259,7 @@ public:
      */
     template<typename To>
     meta_factory conv() noexcept {
-        using conv_type = std::remove_cvref_t<To>;
+        using conv_type = stl::remove_cvref_t<To>;
         auto *const op = +[](const meta_ctx &area, const void *instance) { return forward_as_meta(area, static_cast<To>(*static_cast<const Type *>(instance))); };
 
         base_type::insert_or_assign(
@@ -287,7 +287,7 @@ public:
     meta_factory ctor() noexcept {
         using descriptor = meta_function_helper_t<Type, decltype(Candidate)>;
         static_assert(Policy::template value<typename descriptor::return_type>, "Invalid return type for the given policy");
-        static_assert(std::is_same_v<std::remove_cvref_t<typename descriptor::return_type>, Type>, "The function doesn't return an object of the required type");
+        static_assert(stl::is_same_v<stl::remove_cvref_t<typename descriptor::return_type>, Type>, "The function doesn't return an object of the required type");
 
         base_type::insert_or_assign(
             internal::meta_ctor_node{
@@ -354,7 +354,7 @@ public:
      */
     template<auto Data, typename Policy = as_value_t>
     meta_factory data(const id_type id, const char *name = nullptr) noexcept {
-        if constexpr(std::is_member_object_pointer_v<decltype(Data)>) {
+        if constexpr(stl::is_member_object_pointer_v<decltype(Data)>) {
             using data_type = std::invoke_result_t<decltype(Data), Type &>;
             static_assert(Policy::template value<data_type>, "Invalid return type for the given policy");
 
@@ -365,8 +365,8 @@ public:
                     /* this is never static */
                     std::is_const_v<std::remove_reference_t<data_type>> ? internal::meta_traits::is_const : internal::meta_traits::is_none,
                     1u,
-                    &internal::resolve<std::remove_cvref_t<data_type>>,
-                    &meta_arg<type_list<std::remove_cvref_t<data_type>>>,
+                    &internal::resolve<stl::remove_cvref_t<data_type>>,
+                    &meta_arg<type_list<stl::remove_cvref_t<data_type>>>,
                     &meta_setter<Type, Data>,
                     &meta_getter<Type, Data, Policy>});
         } else {
@@ -384,8 +384,8 @@ public:
                     name,
                     ((!std::is_pointer_v<decltype(Data)> || std::is_const_v<data_type>) ? internal::meta_traits::is_const : internal::meta_traits::is_none) | internal::meta_traits::is_static,
                     1u,
-                    &internal::resolve<std::remove_cvref_t<data_type>>,
-                    &meta_arg<type_list<std::remove_cvref_t<data_type>>>,
+                    &internal::resolve<stl::remove_cvref_t<data_type>>,
+                    &meta_arg<type_list<stl::remove_cvref_t<data_type>>>,
                     &meta_setter<Type, Data>,
                     &meta_getter<Type, Data, Policy>});
         }
@@ -433,7 +433,7 @@ public:
         using descriptor = meta_function_helper_t<Type, decltype(Getter)>;
         static_assert(Policy::template value<typename descriptor::return_type>, "Invalid return type for the given policy");
 
-        if constexpr(std::is_same_v<decltype(Setter), std::nullptr_t>) {
+        if constexpr(stl::is_same_v<decltype(Setter), std::nullptr_t>) {
             base_type::data(
                 internal::meta_data_node{
                     id,
@@ -441,7 +441,7 @@ public:
                     /* this is never static */
                     internal::meta_traits::is_const,
                     0u,
-                    &internal::resolve<std::remove_cvref_t<typename descriptor::return_type>>,
+                    &internal::resolve<stl::remove_cvref_t<typename descriptor::return_type>>,
                     &meta_arg<type_list<>>,
                     &meta_setter<Type, Setter>,
                     &meta_getter<Type, Getter, Policy>});
@@ -455,7 +455,7 @@ public:
                     /* this is never static nor const */
                     internal::meta_traits::is_none,
                     1u,
-                    &internal::resolve<std::remove_cvref_t<typename descriptor::return_type>>,
+                    &internal::resolve<stl::remove_cvref_t<typename descriptor::return_type>>,
                     &meta_arg<type_list<type_list_element_t<static_cast<std::size_t>(args_type::size != 1u), args_type>>>,
                     &meta_setter<Type, Setter>,
                     &meta_getter<Type, Getter, Policy>});
@@ -501,7 +501,7 @@ public:
                 name,
                 (descriptor::is_const ? internal::meta_traits::is_const : internal::meta_traits::is_none) | (descriptor::is_static ? internal::meta_traits::is_static : internal::meta_traits::is_none),
                 descriptor::args_type::size,
-                &internal::resolve<std::conditional_t<std::is_same_v<Policy, as_void_t>, void, std::remove_cvref_t<typename descriptor::return_type>>>,
+                &internal::resolve<std::conditional_t<stl::is_same_v<Policy, as_void_t>, void, stl::remove_cvref_t<typename descriptor::return_type>>>,
                 &meta_arg<typename descriptor::args_type>,
                 &meta_invoke<Type, Candidate, Policy>});
 

+ 17 - 17
src/entt/meta/meta.hpp

@@ -68,7 +68,7 @@ public:
         : ctx{&area},
           data{&instance},
           value_type_node{&internal::resolve<typename Type::value_type>},
-          const_reference_node{&internal::resolve<std::remove_cvref_t<typename Type::const_reference>>},
+          const_reference_node{&internal::resolve<stl::remove_cvref_t<typename Type::const_reference>>},
           size_fn{meta_sequence_container_traits<std::remove_const_t<Type>>::size},
           clear_fn{meta_sequence_container_traits<std::remove_const_t<Type>>::clear},
           reserve_fn{meta_sequence_container_traits<std::remove_const_t<Type>>::reserve},
@@ -262,7 +262,7 @@ public:
     explicit meta_any(const meta_ctx &area, std::in_place_type_t<Type>, Args &&...args)
         : storage{std::in_place_type<Type>, std::forward<Args>(args)...},
           ctx{&area},
-          vtable{&basic_vtable<std::remove_cvref_t<Type>>} {}
+          vtable{&basic_vtable<stl::remove_cvref_t<Type>>} {}
 
     /**
      * @brief Constructs a wrapper taking ownership of the passed object.
@@ -292,7 +292,7 @@ public:
      * @param value An instance of an object to use to initialize the wrapper.
      */
     template<typename Type>
-    requires (!std::same_as<std::remove_cvref_t<Type>, meta_any>)
+    requires (!std::same_as<stl::remove_cvref_t<Type>, meta_any>)
     meta_any(Type &&value)
         : meta_any{locator<meta_ctx>::value_or(), std::forward<Type>(value)} {}
 
@@ -303,7 +303,7 @@ public:
      * @param value An instance of an object to use to initialize the wrapper.
      */
     template<typename Type>
-    requires (!std::same_as<std::remove_cvref_t<Type>, meta_any>)
+    requires (!std::same_as<stl::remove_cvref_t<Type>, meta_any>)
     meta_any(const meta_ctx &area, Type &&value)
         : meta_any{area, std::in_place_type<std::decay_t<Type>>, std::forward<Type>(value)} {}
 
@@ -389,7 +389,7 @@ public:
      * @return This meta any object.
      */
     template<typename Type>
-    requires (!std::same_as<std::remove_cvref_t<Type>, meta_any>)
+    requires (!std::same_as<stl::remove_cvref_t<Type>, meta_any>)
     meta_any &operator=(Type &&value) {
         emplace<std::decay_t<Type>>(std::forward<Type>(value));
         return *this;
@@ -495,22 +495,22 @@ public:
     template<typename Type>
     [[nodiscard]] meta_any allow_cast() const {
         if constexpr(!std::is_reference_v<Type> || std::is_const_v<std::remove_reference_t<Type>>) {
-            if(storage.has_value<std::remove_cvref_t<Type>>()) {
+            if(storage.has_value<stl::remove_cvref_t<Type>>()) {
                 return as_ref();
             } else if(*this) {
-                if constexpr(std::is_arithmetic_v<std::remove_cvref_t<Type>> || std::is_enum_v<std::remove_cvref_t<Type>>) {
+                if constexpr(std::is_arithmetic_v<stl::remove_cvref_t<Type>> || std::is_enum_v<stl::remove_cvref_t<Type>>) {
                     if(const auto &from = fetch_node(); from.conversion_helper) {
                         return meta_any{*ctx, static_cast<Type>(from.conversion_helper(nullptr, storage.data()))};
                     }
                 }
 
                 if(const auto &from = fetch_node(); from.details != nullptr) {
-                    if(const auto *elem = internal::find_member(from.details->conv, entt::type_hash<std::remove_cvref_t<Type>>::value()); elem != nullptr) {
+                    if(const auto *elem = internal::find_member(from.details->conv, entt::type_hash<stl::remove_cvref_t<Type>>::value()); elem != nullptr) {
                         return elem->conv(*ctx, storage.data());
                     }
 
                     for(auto &&curr: from.details->base) {
-                        if(auto other = curr.type(internal::meta_context::from(*ctx)).from_void(*ctx, nullptr, curr.cast(storage.data())); curr.id == entt::type_hash<std::remove_cvref_t<Type>>::value()) {
+                        if(auto other = curr.type(internal::meta_context::from(*ctx)).from_void(*ctx, nullptr, curr.cast(storage.data())); curr.id == entt::type_hash<stl::remove_cvref_t<Type>>::value()) {
                             return other;
                         } else if(auto from_base = std::as_const(other).template allow_cast<Type>(); from_base) {
                             return from_base;
@@ -533,9 +533,9 @@ public:
         if constexpr(std::is_reference_v<Type> && !std::is_const_v<std::remove_reference_t<Type>>) {
             return allow_cast<const std::remove_reference_t<Type> &>() && (storage.policy() != any_policy::cref);
         } else {
-            if(storage.has_value<std::remove_cvref_t<Type>>()) {
+            if(storage.has_value<stl::remove_cvref_t<Type>>()) {
                 return true;
-            } else if(auto other = std::as_const(*this).allow_cast<std::remove_cvref_t<Type>>(); other) {
+            } else if(auto other = std::as_const(*this).allow_cast<stl::remove_cvref_t<Type>>(); other) {
                 if(other.storage.owner()) {
                     std::swap(*this, other);
                 }
@@ -551,7 +551,7 @@ public:
     template<typename Type, typename... Args>
     void emplace(Args &&...args) {
         storage.emplace<Type>(std::forward<Args>(args)...);
-        auto *prev = std::exchange(vtable, &basic_vtable<std::remove_cvref_t<Type>>);
+        auto *prev = std::exchange(vtable, &basic_vtable<stl::remove_cvref_t<Type>>);
         node = (prev == vtable) ? node : nullptr;
     }
 
@@ -689,7 +689,7 @@ template<typename Type>
 /*! @brief Opaque pointers to instances of any type. */
 class meta_handle {
     template<typename Type, typename... Args>
-    requires std::same_as<std::remove_cvref_t<Type>, meta_any>
+    requires std::same_as<stl::remove_cvref_t<Type>, meta_any>
     meta_handle(int, Type &value, Args &&...args)
         : any{std::forward<Args>(args)..., value.as_ref()} {}
 
@@ -708,7 +708,7 @@ public:
      * @param value An instance of an object to use to initialize the handle.
      */
     template<typename Type>
-    requires (!std::same_as<std::remove_cvref_t<Type>, meta_handle>)
+    requires (!std::same_as<stl::remove_cvref_t<Type>, meta_handle>)
     meta_handle(const meta_ctx &ctx, Type &value)
         : meta_handle{0, value, ctx} {}
 
@@ -718,7 +718,7 @@ public:
      * @param value An instance of an object to use to initialize the handle.
      */
     template<typename Type>
-    requires (!std::same_as<std::remove_cvref_t<Type>, meta_handle>)
+    requires (!std::same_as<stl::remove_cvref_t<Type>, meta_handle>)
     meta_handle(Type &value)
         : meta_handle{0, value} {}
 
@@ -1058,7 +1058,7 @@ class meta_type {
         bool ambiguous{};
 
         for(auto curr = next(); curr; curr = next()) {
-            if constexpr(std::is_same_v<std::decay_t<decltype(*curr)>, internal::meta_func_node>) {
+            if constexpr(stl::is_same_v<std::decay_t<decltype(*curr)>, internal::meta_func_node>) {
                 if(constness && !(curr->traits & internal::meta_traits::is_const)) {
                     continue;
                 }
@@ -1087,7 +1087,7 @@ class meta_type {
                         same = match;
                         ambiguous = false;
                     } else if(match == same) {
-                        if constexpr(std::is_same_v<std::decay_t<decltype(*curr)>, internal::meta_func_node>) {
+                        if constexpr(stl::is_same_v<std::decay_t<decltype(*curr)>, internal::meta_func_node>) {
                             if(!!(curr->traits & internal::meta_traits::is_const) != !!(candidate->traits & internal::meta_traits::is_const)) {
                                 candidate = !!(candidate->traits & internal::meta_traits::is_const) ? curr : candidate;
                                 ambiguous = false;

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

@@ -190,7 +190,7 @@ const meta_type_node &resolve(const meta_context &) noexcept;
 template<typename... Args>
 [[nodiscard]] const meta_type_node &meta_arg_node(const meta_context &context, type_list<Args...>, const std::size_t index) noexcept {
     using resolve_type = const meta_type_node &(*)(const meta_context &) noexcept;
-    constexpr std::array<resolve_type, sizeof...(Args)> list{&resolve<std::remove_cvref_t<Args>>...};
+    constexpr std::array<resolve_type, sizeof...(Args)> list{&resolve<stl::remove_cvref_t<Args>>...};
     ENTT_ASSERT(index < sizeof...(Args), "Out of bounds");
     return list[index](context);
 }

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

@@ -71,7 +71,7 @@ struct meta_range_iterator final {
     }
 
     [[nodiscard]] constexpr reference operator[](const difference_type value) const noexcept {
-        if constexpr(std::is_same_v<It, typename meta_context::container_type::const_iterator>) {
+        if constexpr(stl::is_same_v<It, typename meta_context::container_type::const_iterator>) {
             return {it[value].first, Type{*ctx, *it[value].second}};
         } else {
             return {it[value].id, Type{*ctx, it[value]}};

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

@@ -20,7 +20,7 @@ namespace entt {
 template<typename Type>
 [[nodiscard]] meta_type resolve(const meta_ctx &ctx) noexcept {
     const auto &context = internal::meta_context::from(ctx);
-    return {ctx, internal::resolve<std::remove_cvref_t<Type>>(context)};
+    return {ctx, internal::resolve<stl::remove_cvref_t<Type>>(context)};
 }
 
 /**

+ 10 - 10
src/entt/meta/utility.hpp

@@ -93,11 +93,11 @@ struct meta_function_descriptor<Type, Ret (*)(MaybeType, Args...)>
     : meta_function_descriptor_traits<
           Ret,
           std::conditional_t<
-              std::is_same_v<std::remove_cvref_t<MaybeType>, Type> || std::is_base_of_v<std::remove_cvref_t<MaybeType>, Type>,
+              stl::is_same_v<stl::remove_cvref_t<MaybeType>, Type> || std::is_base_of_v<stl::remove_cvref_t<MaybeType>, Type>,
               type_list<Args...>,
               type_list<MaybeType, Args...>>,
-          !(std::is_same_v<std::remove_cvref_t<MaybeType>, Type> || std::is_base_of_v<std::remove_cvref_t<MaybeType>, Type>),
-          std::is_const_v<std::remove_reference_t<MaybeType>> && (std::is_same_v<std::remove_cvref_t<MaybeType>, Type> || std::is_base_of_v<std::remove_cvref_t<MaybeType>, Type>)> {};
+          !(stl::is_same_v<stl::remove_cvref_t<MaybeType>, Type> || std::is_base_of_v<stl::remove_cvref_t<MaybeType>, Type>),
+          std::is_const_v<std::remove_reference_t<MaybeType>> && (stl::is_same_v<stl::remove_cvref_t<MaybeType>, Type> || std::is_base_of_v<stl::remove_cvref_t<MaybeType>, Type>)> {};
 
 /**
  * @brief Meta function descriptor.
@@ -130,7 +130,7 @@ class meta_function_helper {
     static meta_function_descriptor<Type, Ret (Class::*)(Args...)> get_rid_of_noexcept(Ret (Class::*)(Args...));
 
     template<typename Ret, typename Class>
-    requires std::is_member_object_pointer_v<Ret Class::*>
+    requires stl::is_member_object_pointer_v<Ret Class::*>
     static meta_function_descriptor<Type, Ret Class::*> get_rid_of_noexcept(Ret Class::*);
 
     template<typename Ret, typename... Args>
@@ -167,12 +167,12 @@ using meta_function_helper_t = meta_function_helper<Type, Candidate>::type;
  */
 template<meta_policy Policy = as_value_t, typename Type>
 [[nodiscard]] meta_any meta_dispatch(const meta_ctx &ctx, [[maybe_unused]] Type &&value) {
-    if constexpr(std::is_same_v<Policy, as_cref_t>) {
+    if constexpr(stl::is_same_v<Policy, as_cref_t>) {
         static_assert(std::is_lvalue_reference_v<Type>, "Invalid type");
         return meta_any{ctx, std::in_place_type<const std::remove_reference_t<Type> &>, std::as_const(value)};
-    } else if constexpr(std::is_same_v<Policy, as_ref_t> || (std::is_same_v<Policy, as_is_t> && std::is_lvalue_reference_v<Type>)) {
+    } else if constexpr(stl::is_same_v<Policy, as_ref_t> || (stl::is_same_v<Policy, as_is_t> && std::is_lvalue_reference_v<Type>)) {
         return meta_any{ctx, std::in_place_type<Type>, value};
-    } else if constexpr(std::is_same_v<Policy, as_void_t>) {
+    } else if constexpr(stl::is_same_v<Policy, as_void_t>) {
         return meta_any{ctx, std::in_place_type<void>};
     } else {
         return meta_any{ctx, std::forward<Type>(value)};
@@ -283,7 +283,7 @@ template<typename Type, auto Data>
             std::invoke(Data, *clazz, value.cast<data_type>());
             return true;
         }
-    } else if constexpr(std::is_member_object_pointer_v<decltype(Data)>) {
+    } else if constexpr(stl::is_member_object_pointer_v<decltype(Data)>) {
         using data_type = std::remove_reference_t<typename meta_function_helper_t<Type, decltype(Data)>::return_type>;
 
         if constexpr(!std::is_array_v<data_type> && !std::is_const_v<data_type>) {
@@ -317,7 +317,7 @@ template<typename Type, auto Data>
 template<typename Type, auto Data, meta_policy Policy = as_value_t>
 [[nodiscard]] meta_any meta_getter(meta_handle instance) {
     if constexpr(std::is_member_pointer_v<decltype(Data)> || std::is_function_v<std::remove_reference_t<std::remove_pointer_t<decltype(Data)>>>) {
-        if constexpr(!std::is_array_v<std::remove_cvref_t<std::invoke_result_t<decltype(Data), Type &>>>) {
+        if constexpr(!std::is_array_v<stl::remove_cvref_t<std::invoke_result_t<decltype(Data), Type &>>>) {
             if constexpr(std::is_invocable_v<decltype(Data), Type &>) {
                 if(auto *clazz = instance->try_cast<Type>(); clazz) {
                     return meta_dispatch<Policy>(instance->context(), std::invoke(Data, *clazz));
@@ -419,7 +419,7 @@ template<typename Type, typename... Args>
  */
 template<typename Type, typename Policy = as_value_t, typename Candidate>
 [[nodiscard]] meta_any meta_construct(const meta_ctx &ctx, Candidate &&candidate, meta_any *const args) {
-    if constexpr(meta_function_helper_t<Type, Candidate>::is_static || std::is_class_v<std::remove_cvref_t<Candidate>>) {
+    if constexpr(meta_function_helper_t<Type, Candidate>::is_static || std::is_class_v<stl::remove_cvref_t<Candidate>>) {
         meta_any placeholder{meta_ctx_arg, ctx};
         return internal::meta_invoke<Type, Policy>(placeholder, std::forward<Candidate>(candidate), args, std::make_index_sequence<meta_function_helper_t<Type, std::remove_reference_t<Candidate>>::args_type::size>{});
     } else {

+ 5 - 5
src/entt/poly/poly.hpp

@@ -83,7 +83,7 @@ class poly_vtable {
 
     template<typename Type, auto Candidate, typename Ret, typename Any, typename... Args>
     static void fill_vtable_entry(Ret (*&entry)(Any &, Args...)) noexcept {
-        if constexpr(std::is_invocable_r_v<Ret, decltype(Candidate), Args...>) {
+        if constexpr(stl::is_invocable_r_v<Ret, decltype(Candidate), Args...>) {
             entry = +[](Any &, Args... args) -> Ret {
                 return std::invoke(Candidate, std::forward<Args>(args)...);
             };
@@ -215,7 +215,7 @@ public:
     template<typename Type, typename... Args>
     explicit basic_poly(std::in_place_type_t<Type>, Args &&...args)
         : storage{std::in_place_type<Type>, std::forward<Args>(args)...},
-          vtable{poly_vtable<Concept, Len, Align>::template instance<std::remove_cvref_t<Type>>()} {}
+          vtable{poly_vtable<Concept, Len, Align>::template instance<stl::remove_cvref_t<Type>>()} {}
 
     /**
      * @brief Constructs a poly from a given value.
@@ -223,9 +223,9 @@ public:
      * @param value An instance of an object to use to initialize the poly.
      */
     template<typename Type>
-    requires (!std::same_as<std::remove_cvref_t<Type>, basic_poly>)
+    requires (!std::same_as<stl::remove_cvref_t<Type>, basic_poly>)
     basic_poly(Type &&value) noexcept
-        : basic_poly{std::in_place_type<std::remove_cvref_t<Type>>, std::forward<Type>(value)} {}
+        : basic_poly{std::in_place_type<stl::remove_cvref_t<Type>>, std::forward<Type>(value)} {}
 
     /**
      * @brief Returns the object type info if any, `type_id<void>()` otherwise.
@@ -257,7 +257,7 @@ public:
     template<typename Type, typename... Args>
     void emplace(Args &&...args) {
         storage.template emplace<Type>(std::forward<Args>(args)...);
-        vtable = poly_vtable<Concept, Len, Align>::template instance<std::remove_cvref_t<Type>>();
+        vtable = poly_vtable<Concept, Len, Align>::template instance<stl::remove_cvref_t<Type>>();
     }
 
     /*! @brief Destroys contained object */

+ 1 - 1
src/entt/resource/cache.hpp

@@ -126,7 +126,7 @@ private:
 template<typename Type, typename Loader, typename Allocator>
 class resource_cache {
     using alloc_traits = std::allocator_traits<Allocator>;
-    static_assert(std::is_same_v<typename alloc_traits::value_type, Type>, "Invalid value type");
+    static_assert(stl::is_same_v<typename alloc_traits::value_type, Type>, "Invalid value type");
     using container_allocator = alloc_traits::template rebind_alloc<std::pair<const id_type, typename Loader::result_type>>;
     using container_type = dense_map<id_type, typename Loader::result_type, stl::identity, std::equal_to<>, container_allocator>;
 

+ 7 - 7
src/entt/signal/delegate.hpp

@@ -28,7 +28,7 @@ template<typename Class, typename Ret, typename... Args, typename... Other>
 auto function_pointer(Ret (Class::*)(Args...) const, Other &&...) -> Ret (*)(Args...);
 
 template<typename Class, typename Type, typename... Other>
-requires std::is_member_object_pointer_v<Type Class::*>
+requires stl::is_member_object_pointer_v<Type Class::*>
 auto function_pointer(Type Class::*, Other &&...) -> Type (*)();
 
 template<typename... Type>
@@ -72,7 +72,7 @@ class delegate<Ret(Args...)> {
     [[nodiscard]] auto wrap(std::index_sequence<Index...>) noexcept {
         return [](const void *, Args... args) -> return_type {
             [[maybe_unused]] const auto arguments = stl::forward_as_tuple(std::forward<Args>(args)...);
-            [[maybe_unused]] constexpr auto offset = !std::is_invocable_r_v<Ret, decltype(Candidate), type_list_element_t<Index, type_list<Args...>>...> * (sizeof...(Args) - sizeof...(Index));
+            [[maybe_unused]] constexpr auto offset = !stl::is_invocable_r_v<Ret, decltype(Candidate), type_list_element_t<Index, type_list<Args...>>...> * (sizeof...(Args) - sizeof...(Index));
             return static_cast<Ret>(std::invoke(Candidate, std::forward<type_list_element_t<Index + offset, type_list<Args...>>>(std::get<Index + offset>(arguments))...));
         };
     }
@@ -82,7 +82,7 @@ class delegate<Ret(Args...)> {
         return [](const void *payload, Args... args) -> return_type {
             Type *curr = static_cast<Type *>(const_cast<constness_as_t<void, Type> *>(payload));
             [[maybe_unused]] const auto arguments = stl::forward_as_tuple(std::forward<Args>(args)...);
-            [[maybe_unused]] constexpr auto offset = !std::is_invocable_r_v<Ret, decltype(Candidate), Type &, type_list_element_t<Index, type_list<Args...>>...> * (sizeof...(Args) - sizeof...(Index));
+            [[maybe_unused]] constexpr auto offset = !stl::is_invocable_r_v<Ret, decltype(Candidate), Type &, type_list_element_t<Index, type_list<Args...>>...> * (sizeof...(Args) - sizeof...(Index));
             return static_cast<Ret>(std::invoke(Candidate, *curr, std::forward<type_list_element_t<Index + offset, type_list<Args...>>>(std::get<Index + offset>(arguments))...));
         };
     }
@@ -92,7 +92,7 @@ class delegate<Ret(Args...)> {
         return [](const void *payload, Args... args) -> return_type {
             Type *curr = static_cast<Type *>(const_cast<constness_as_t<void, Type> *>(payload));
             [[maybe_unused]] const auto arguments = stl::forward_as_tuple(std::forward<Args>(args)...);
-            [[maybe_unused]] constexpr auto offset = !std::is_invocable_r_v<Ret, decltype(Candidate), Type *, type_list_element_t<Index, type_list<Args...>>...> * (sizeof...(Args) - sizeof...(Index));
+            [[maybe_unused]] constexpr auto offset = !stl::is_invocable_r_v<Ret, decltype(Candidate), Type *, type_list_element_t<Index, type_list<Args...>>...> * (sizeof...(Args) - sizeof...(Index));
             return static_cast<Ret>(std::invoke(Candidate, curr, std::forward<type_list_element_t<Index + offset, type_list<Args...>>>(std::get<Index + offset>(arguments))...));
         };
     }
@@ -137,7 +137,7 @@ public:
     void connect() noexcept {
         instance = nullptr;
 
-        if constexpr(std::is_invocable_r_v<Ret, decltype(Candidate), Args...>) {
+        if constexpr(stl::is_invocable_r_v<Ret, decltype(Candidate), Args...>) {
             fn = [](const void *, Args... args) -> return_type {
                 return Ret(std::invoke(Candidate, std::forward<Args>(args)...));
             };
@@ -167,7 +167,7 @@ public:
     void connect(Type &value_or_instance) noexcept {
         instance = &value_or_instance;
 
-        if constexpr(std::is_invocable_r_v<Ret, decltype(Candidate), Type &, Args...>) {
+        if constexpr(stl::is_invocable_r_v<Ret, decltype(Candidate), Type &, Args...>) {
             fn = [](const void *payload, Args... args) -> return_type {
                 Type *curr = static_cast<Type *>(const_cast<constness_as_t<void, Type> *>(payload));
                 return Ret(std::invoke(Candidate, *curr, std::forward<Args>(args)...));
@@ -191,7 +191,7 @@ public:
     void connect(Type *value_or_instance) noexcept {
         instance = value_or_instance;
 
-        if constexpr(std::is_invocable_r_v<Ret, decltype(Candidate), Type *, Args...>) {
+        if constexpr(stl::is_invocable_r_v<Ret, decltype(Candidate), Type *, Args...>) {
             fn = [](const void *payload, Args... args) -> return_type {
                 Type *curr = static_cast<Type *>(const_cast<constness_as_t<void, Type> *>(payload));
                 return Ret(std::invoke(Candidate, curr, std::forward<Args>(args)...));

+ 2 - 2
src/entt/signal/emitter.hpp

@@ -147,7 +147,7 @@ public:
      */
     template<typename Type>
     void erase() {
-        handlers.first().erase(type_hash<std::remove_cvref_t<Type>>::value());
+        handlers.first().erase(type_hash<stl::remove_cvref_t<Type>>::value());
     }
 
     /*! @brief Disconnects all the listeners. */
@@ -162,7 +162,7 @@ public:
      */
     template<typename Type>
     [[nodiscard]] bool contains() const {
-        return handlers.first().contains(type_hash<std::remove_cvref_t<Type>>::value());
+        return handlers.first().contains(type_hash<stl::remove_cvref_t<Type>>::value());
     }
 
     /**

+ 1 - 1
src/entt/signal/sigh.hpp

@@ -203,7 +203,7 @@ public:
                 } else {
                     func();
                 }
-            } else if constexpr(std::is_invocable_r_v<bool, Func, Ret>) {
+            } else if constexpr(stl::is_invocable_r_v<bool, Func, Ret>) {
                 if(func(calls[pos - 1u](args...))) {
                     break;
                 }

+ 5 - 0
src/entt/stl/type_traits.hpp

@@ -6,6 +6,11 @@
 /*! @cond ENTT_INTERNAL */
 namespace entt::stl {
 
+using std::is_invocable_r_v;
+using std::is_member_object_pointer_v;
+using std::is_same_v;
+using std::remove_cvref_t;
+
 } // namespace entt::stl
 /*! @endcond */