Explorar el Código

added forward declaration for what matters (close #178)

Michele Caini hace 7 años
padre
commit
f1d0895eb1

+ 6 - 0
src/entt/config/config.h

@@ -28,4 +28,10 @@ using maybe_atomic_t = Type;
 #endif
 
 
+#ifndef ENTT_ENTITY_TYPE
+#include <cstdint>
+#define ENTT_ENTITY_TYPE std::uint32_t
+#endif
+
+
 #endif // ENTT_CONFIG_CONFIG_H

+ 0 - 1
src/entt/core/hashed_string.hpp

@@ -3,7 +3,6 @@
 
 
 #include <cstddef>
-#include <cstdint>
 #include "../config/config.h"
 
 

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

@@ -2,9 +2,9 @@
 #define ENTT_CORE_IDENT_HPP
 
 
-#include <type_traits>
-#include <utility>
 #include <tuple>
+#include <utility>
+#include <type_traits>
 #include "../config/config.h"
 
 

+ 7 - 6
src/entt/entity/actor.hpp

@@ -8,6 +8,7 @@
 #include "../config/config.h"
 #include "registry.hpp"
 #include "entity.hpp"
+#include "fwd.hpp"
 
 
 namespace entt {
@@ -22,9 +23,9 @@ namespace entt {
  * @tparam Entity A valid entity type (see entt_traits for more details).
  */
 template<typename Entity>
-struct actor {
+struct basic_actor {
     /*! @brief Type of registry used internally. */
-    using registry_type = registry<Entity>;
+    using registry_type = basic_registry<Entity>;
     /*! @brief Underlying entity identifier. */
     using entity_type = Entity;
 
@@ -32,12 +33,12 @@ struct actor {
      * @brief Constructs an actor by using the given registry.
      * @param reg An entity-component system properly initialized.
      */
-    actor(registry_type &reg)
+    basic_actor(registry_type &reg)
         : reg{&reg}, entt{reg.create()}
     {}
 
     /*! @brief Default destructor. */
-    virtual ~actor() {
+    virtual ~basic_actor() {
         reg->destroy(entt);
     }
 
@@ -50,7 +51,7 @@ struct actor {
      *
      * @param other The instance to move from.
      */
-    actor(actor &&other)
+    basic_actor(basic_actor &&other)
         : reg{other.reg}, entt{other.entt}
     {
         other.entt = null;
@@ -66,7 +67,7 @@ struct actor {
      * @param other The instance to move from.
      * @return This actor.
      */
-    actor & operator=(actor &&other) {
+    basic_actor & operator=(basic_actor &&other) {
         if(this != &other) {
             auto tmp{std::move(other)};
             std::swap(reg, tmp.reg);

+ 82 - 0
src/entt/entity/fwd.hpp

@@ -0,0 +1,82 @@
+#ifndef ENTT_ENTITY_FWD_HPP
+#define ENTT_ENTITY_FWD_HPP
+
+
+#include "../config/config.h"
+
+
+namespace entt {
+
+
+/*! @brief Forward declaration of the registry class. */
+template <typename>
+class basic_registry;
+
+/*! @brief Forward declaration of the view class. */
+template<typename, typename...>
+class basic_view;
+
+/*! @brief Forward declaration of the group class. */
+template<typename...>
+class basic_group;
+
+/*! @brief Forward declaration of the actor class. */
+template <typename>
+struct basic_actor;
+
+/*! @brief Forward declaration of the prototype class. */
+template<typename>
+class basic_prototype;
+
+/*! @brief Forward declaration of the snapshot class. */
+template<typename>
+class basic_snapshot;
+
+/*! @brief Forward declaration of the snapshot loader class. */
+template<typename>
+class basic_snapshot_loader;
+
+/*! @brief Forward declaration of the continuous loader class. */
+template<typename>
+class basic_continuous_loader;
+
+/*! @brief Alias declaration for the most common use case. */
+using entity = ENTT_ENTITY_TYPE;
+
+/*! @brief Alias declaration for the most common use case. */
+using registry = basic_registry<entity>;
+
+/*! @brief Alias declaration for the most common use case. */
+using actor = basic_actor<entity>;
+
+/*! @brief Alias declaration for the most common use case. */
+using prototype = basic_prototype<entity>;
+
+/*! @brief Alias declaration for the most common use case. */
+using snapshot = basic_snapshot<entity>;
+
+/*! @brief Alias declaration for the most common use case. */
+using snapshot_loader = basic_snapshot_loader<entity>;
+
+/*! @brief Alias declaration for the most common use case. */
+using continuous_loader = basic_continuous_loader<entity>;
+
+/**
+ * @brief Alias declaration for the most common use case.
+ * @tparam Component Types of components iterated by the view.
+ */
+template<typename... Types>
+using view = basic_view<entity, Types...>;
+
+/**
+ * @brief Alias declaration for the most common use case.
+ * @tparam Types Types of components iterated by the group.
+ */
+template<typename... Types>
+using group = basic_group<entity, Types...>;
+
+
+}
+
+
+#endif // ENTT_ENTITY_FWD_HPP

+ 10 - 16
src/entt/entity/group.hpp

@@ -9,18 +9,12 @@
 #include "../config/config.h"
 #include "../core/type_traits.hpp"
 #include "sparse_set.hpp"
+#include "fwd.hpp"
 
 
 namespace entt {
 
 
-/**
- * @brief Forward declaration of the registry class.
- */
-template<typename>
-class registry;
-
-
 /**
  * @brief Alias for lists of observed components.
  * @tparam Type List of types.
@@ -44,7 +38,7 @@ constexpr get_t<Type...> get{};
  * compile-time error, but for a few reasonable cases.
  */
 template<typename...>
-class group;
+class basic_group;
 
 
 /**
@@ -82,20 +76,20 @@ class group;
  * In any other case, attempting to use a group results in undefined behavior.
  *
  * @tparam Entity A valid entity type (see entt_traits for more details).
- * @tparam Get Types of components iterated by the group.
+ * @tparam Get Types of components observed by the group.
  */
 template<typename Entity, typename... Get>
-class group<Entity, get_t<Get...>> {
+class basic_group<Entity, get_t<Get...>> {
     static_assert(sizeof...(Get) > 0);
 
     /*! @brief A registry is allowed to create groups. */
-    friend class registry<Entity>;
+    friend class basic_registry<Entity>;
 
     template<typename Component>
     using pool_type = std::conditional_t<std::is_const_v<Component>, const sparse_set<Entity, std::remove_const_t<Component>>, sparse_set<Entity, Component>>;
 
     // we could use pool_type<Get> *..., but vs complains about it and refuses to compile for unknown reasons (likely a bug)
-    group(sparse_set<Entity> *handler, sparse_set<Entity, std::remove_const_t<Get>> *... pools) ENTT_NOEXCEPT
+    basic_group(sparse_set<Entity> *handler, sparse_set<Entity, std::remove_const_t<Get>> *... pools) ENTT_NOEXCEPT
         : handler{handler},
           pools{pools...}
     {}
@@ -335,11 +329,11 @@ private:
  * @tparam Owned Types of components owned by the group.
  */
 template<typename Entity, typename... Get, typename... Owned>
-class group<Entity, get_t<Get...>, Owned...> {
+class basic_group<Entity, get_t<Get...>, Owned...> {
     static_assert(sizeof...(Get) + sizeof...(Owned) > 0);
 
     /*! @brief A registry is allowed to create groups. */
-    friend class registry<Entity>;
+    friend class basic_registry<Entity>;
 
     template<typename Component>
     using pool_type = std::conditional_t<std::is_const_v<Component>, const sparse_set<Entity, std::remove_const_t<Component>>, sparse_set<Entity, Component>>;
@@ -348,7 +342,7 @@ class group<Entity, get_t<Get...>, Owned...> {
     using component_iterator_type = decltype(std::declval<pool_type<Component>>().begin());
 
     // we could use pool_type<Type> *..., but vs complains about it and refuses to compile for unknown reasons (likely a bug)
-    group(const typename registry<Entity>::size_type *length, sparse_set<Entity, std::remove_const_t<Owned>> *... owned, sparse_set<Entity, std::remove_const_t<Get>> *... others) ENTT_NOEXCEPT
+    basic_group(const typename basic_registry<Entity>::size_type *length, sparse_set<Entity, std::remove_const_t<Owned>> *... owned, sparse_set<Entity, std::remove_const_t<Get>> *... others) ENTT_NOEXCEPT
         : length{length},
           pools{owned..., others...}
     {}
@@ -551,7 +545,7 @@ public:
     }
 
 private:
-    const typename registry<Entity>::size_type *length;
+    const typename basic_registry<Entity>::size_type *length;
     const std::tuple<pool_type<Owned> *..., pool_type<Get> *...> pools;
 };
 

+ 11 - 11
src/entt/entity/helper.hpp

@@ -19,7 +19,7 @@ namespace entt {
 template<bool Const, typename Entity>
 struct as_view {
     /*! @brief Type of registry to convert. */
-    using registry_type = std::conditional_t<Const, const entt::registry<Entity>, entt::registry<Entity>>;
+    using registry_type = std::conditional_t<Const, const entt::basic_registry<Entity>, entt::basic_registry<Entity>>;
 
     /**
      * @brief Constructs a converter for a given registry.
@@ -33,7 +33,7 @@ struct as_view {
      * @return A newly created view.
      */
     template<typename... Component>
-    inline operator entt::view<Entity, Component...>() const {
+    inline operator entt::basic_view<Entity, Component...>() const {
         return reg.template view<Component...>();
     }
 
@@ -51,12 +51,12 @@ private:
  * @tparam Entity A valid entity type (see entt_traits for more details).
  */
 template<typename Entity>
-as_view(registry<Entity> &) ENTT_NOEXCEPT -> as_view<false, Entity>;
+as_view(basic_registry<Entity> &) ENTT_NOEXCEPT -> as_view<false, Entity>;
 
 
 /*! @copydoc as_view */
 template<typename Entity>
-as_view(const registry<Entity> &) ENTT_NOEXCEPT -> as_view<true, Entity>;
+as_view(const basic_registry<Entity> &) ENTT_NOEXCEPT -> as_view<true, Entity>;
 
 
 /**
@@ -67,7 +67,7 @@ as_view(const registry<Entity> &) ENTT_NOEXCEPT -> as_view<true, Entity>;
 template<bool Const, typename Entity>
 struct as_group {
     /*! @brief Type of registry to convert. */
-    using registry_type = std::conditional_t<Const, const entt::registry<Entity>, entt::registry<Entity>>;
+    using registry_type = std::conditional_t<Const, const entt::basic_registry<Entity>, entt::basic_registry<Entity>>;
 
     /**
      * @brief Constructs a converter for a given registry.
@@ -86,7 +86,7 @@ struct as_group {
      * @return A newly created group.
      */
     template<typename... Owned>
-    inline operator entt::group<Entity, get_t<>, Owned...>() const {
+    inline operator entt::basic_group<Entity, get_t<>, Owned...>() const {
         return reg.template group<Owned...>();
     }
 
@@ -104,12 +104,12 @@ private:
  * @tparam Entity A valid entity type (see entt_traits for more details).
  */
 template<typename Entity>
-as_group(registry<Entity> &) ENTT_NOEXCEPT -> as_group<false, Entity>;
+as_group(basic_registry<Entity> &) ENTT_NOEXCEPT -> as_group<false, Entity>;
 
 
 /*! @copydoc as_group */
 template<typename Entity>
-as_group(const registry<Entity> &) ENTT_NOEXCEPT -> as_group<true, Entity>;
+as_group(const basic_registry<Entity> &) ENTT_NOEXCEPT -> as_group<true, Entity>;
 
 
 /**
@@ -127,7 +127,7 @@ as_group(const registry<Entity> &) ENTT_NOEXCEPT -> as_group<true, Entity>;
  * @param entity A valid entity identifier.
  */
 template<typename Entity, typename... Component>
-void dependency(registry<Entity> &registry, const Entity entity) {
+void dependency(basic_registry<Entity> &registry, const Entity entity) {
     ((registry.template has<Component>(entity) ? void() : (registry.template assign<Component>(entity), void())), ...);
 }
 
@@ -150,7 +150,7 @@ void dependency(registry<Entity> &registry, const Entity entity) {
  * @param sink A sink object properly initialized.
  */
 template<typename... Dependency, typename Entity>
-inline void connect(sink<void(registry<Entity> &, const Entity)> sink) {
+inline void connect(sink<void(basic_registry<Entity> &, const Entity)> sink) {
     sink.template connect<dependency<Entity, Dependency...>>();
 }
 
@@ -173,7 +173,7 @@ inline void connect(sink<void(registry<Entity> &, const Entity)> sink) {
  * @param sink A sink object properly initialized.
  */
 template<typename... Dependency, typename Entity>
-inline void disconnect(sink<void(registry<Entity> &, const Entity)> sink) {
+inline void disconnect(sink<void(basic_registry<Entity> &, const Entity)> sink) {
     sink.template disconnect<dependency<Entity, Dependency...>>();
 }
 

+ 12 - 11
src/entt/entity/prototype.hpp

@@ -10,6 +10,7 @@
 #include "../config/config.h"
 #include "registry.hpp"
 #include "entity.hpp"
+#include "fwd.hpp"
 
 
 namespace entt {
@@ -37,9 +38,9 @@ namespace entt {
  * @tparam Entity A valid entity type (see entt_traits for more details).
  */
 template<typename Entity>
-class prototype {
-    using basic_fn_type = void(const prototype &, registry<Entity> &, const Entity);
-    using component_type = typename registry<Entity>::component_type;
+class basic_prototype {
+    using basic_fn_type = void(const basic_prototype &, basic_registry<Entity> &, const Entity);
+    using component_type = typename basic_registry<Entity>::component_type;
 
     template<typename Component>
     struct component_wrapper { Component component; };
@@ -57,7 +58,7 @@ class prototype {
 
 public:
     /*! @brief Registry type. */
-    using registry_type = registry<Entity>;
+    using registry_type = basic_registry<Entity>;
     /*! @brief Underlying entity identifier. */
     using entity_type = Entity;
     /*! @brief Unsigned integer type. */
@@ -67,7 +68,7 @@ public:
      * @brief Constructs a prototype that is bound to a given registry.
      * @param reg A valid reference to a registry.
      */
-    prototype(registry<Entity> &reg)
+    basic_prototype(registry_type &reg)
         : reg{&reg},
           entity{reg.create()}
     {}
@@ -75,7 +76,7 @@ public:
     /**
      * @brief Releases all its resources.
      */
-    ~prototype() {
+    ~basic_prototype() {
         release();
     }
 
@@ -88,7 +89,7 @@ public:
      *
      * @param other The instance to move from.
      */
-    prototype(prototype &&other)
+    basic_prototype(basic_prototype &&other)
         : handlers{std::move(other.handlers)},
           reg{other.reg},
           entity{other.entity}
@@ -106,7 +107,7 @@ public:
      * @param other The instance to move from.
      * @return This prototype.
      */
-    prototype & operator=(prototype &&other) {
+    basic_prototype & operator=(basic_prototype &&other) {
         if(this != &other) {
             auto tmp{std::move(other)};
             handlers.swap(tmp.handlers);
@@ -126,12 +127,12 @@ public:
      */
     template<typename Component, typename... Args>
     Component & set(Args &&... args) {
-        basic_fn_type *assign_or_replace = [](const prototype &prototype, registry<Entity> &other, const Entity dst) {
+        basic_fn_type *assign_or_replace = [](const basic_prototype &prototype, registry_type &other, const Entity dst) {
             const auto &wrapper = prototype.reg->template get<component_wrapper<Component>>(prototype.entity);
             other.template assign_or_replace<Component>(dst, wrapper.component);
         };
 
-        basic_fn_type *assign = [](const prototype &prototype, registry<Entity> &other, const Entity dst) {
+        basic_fn_type *assign = [](const basic_prototype &prototype, registry_type &other, const Entity dst) {
             if(!other.template has<Component>(dst)) {
                 const auto &wrapper = prototype.reg->template get<component_wrapper<Component>>(prototype.entity);
                 other.template assign<Component>(dst, wrapper.component);
@@ -469,7 +470,7 @@ public:
 
 private:
     std::unordered_map<component_type, component_handler> handlers;
-    registry<Entity> *reg;
+    registry_type *reg;
     entity_type entity;
 };
 

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

@@ -7,7 +7,6 @@
 #include <memory>
 #include <utility>
 #include <cstddef>
-#include <cstdint>
 #include <cassert>
 #include <numeric>
 #include <iterator>
@@ -19,8 +18,9 @@
 #include "../core/hashed_string.hpp"
 #include "../core/type_traits.hpp"
 #include "../signal/sigh.hpp"
-#include "entity.hpp"
 #include "entt_traits.hpp"
+#include "entity.hpp"
+#include "fwd.hpp"
 #include "group.hpp"
 #include "snapshot.hpp"
 #include "sparse_set.hpp"
@@ -56,10 +56,10 @@ constexpr exclude_t<Type...> exclude{};
  *
  * @tparam Entity A valid entity type (see entt_traits for more details).
  */
-template<typename Entity = std::uint32_t>
-class registry {
+template<typename Entity>
+class basic_registry {
     using component_family = family<struct internal_registry_component_family>;
-    using signal_type = sigh<void(registry &, const Entity)>;
+    using signal_type = sigh<void(basic_registry &, const Entity)>;
     using traits_type = entt_traits<Entity>;
 
     template<typename Component>
@@ -91,7 +91,7 @@ class registry {
 
         signal_type construction;
         signal_type destruction;
-        registry *owner;
+        basic_registry *owner;
     };
 
     template<typename Component>
@@ -103,13 +103,13 @@ class registry {
     template<typename... Get, typename... Exclude>
     struct non_owning_group<type_list<Exclude...>, type_list<Get...>>: sparse_set<Entity> {
         template<auto Accepted>
-        void construct_if(registry &reg, const Entity entity) {
+        void construct_if(basic_registry &reg, const Entity entity) {
             if(reg.has<Get...>(entity) && (0 + ... + reg.has<Exclude>(entity)) == Accepted) {
                 this->construct(entity);
             }
         }
 
-        void destroy_if(registry &, const Entity entity) {
+        void destroy_if(basic_registry &, const Entity entity) {
             if(this->has(entity)) {
                 this->destroy(entity);
             }
@@ -126,7 +126,7 @@ class registry {
     template<typename... Owned, typename... Get, typename... Exclude>
     struct owning_group<type_list<Exclude...>, type_list<Get...>, Owned...>: boxed_owned {
         template<auto Accepted>
-        void induce_if(registry &reg, const Entity entity) {
+        void induce_if(basic_registry &reg, const Entity entity) {
             if(reg.has<Owned..., Get...>(entity) && (0 + ... + reg.has<Exclude>(entity)) == Accepted) {
                 const auto curr = this->owned++;
                 const auto cpools = std::make_tuple(reg.pool<Owned>()...);
@@ -135,7 +135,7 @@ class registry {
             }
         }
 
-        void discard_if(registry &reg, const Entity entity) {
+        void discard_if(basic_registry &reg, const Entity entity) {
             const auto cpools = std::make_tuple(reg.pool<Owned>()...);
 
             if(std::get<0>(cpools)->has(entity) && std::get<0>(cpools)->sparse_set<Entity>::get(entity) < this->owned) {
@@ -249,13 +249,13 @@ public:
     using sink_type = typename signal_type::sink_type;
 
     /*! @brief Default constructor. */
-    registry() ENTT_NOEXCEPT = default;
+    basic_registry() ENTT_NOEXCEPT = default;
 
     /*! @brief Default move constructor. */
-    registry(registry &&) = default;
+    basic_registry(basic_registry &&) = default;
 
     /*! @brief Default move assignment operator. @return This registry. */
-    registry & operator=(registry &&) = default;
+    basic_registry & operator=(basic_registry &&) = default;
 
     /**
      * @brief Returns the numeric identifier of a component.
@@ -1238,15 +1238,15 @@ public:
      * @return A newly created view.
      */
     template<typename... Component>
-    entt::view<Entity, Component...> view() {
+    entt::basic_view<Entity, Component...> view() {
         return { assure<Component>()... };
     }
 
     /*! @copydoc view */
     template<typename... Component>
-    inline entt::view<Entity, Component...> view() const {
+    inline entt::basic_view<Entity, Component...> view() const {
         static_assert(std::conjunction_v<std::is_const<Component>...>);
-        return const_cast<registry *>(this)->view<Component...>();
+        return const_cast<basic_registry *>(this)->view<Component...>();
     }
 
     /**
@@ -1289,7 +1289,7 @@ public:
      * @return A newly created group.
      */
     template<typename... Owned, typename... Get, typename... Exclude>
-    entt::group<Entity, get_t<Get...>, Owned...> group(get_t<Get...>, exclude_t<Exclude...> = {}) {
+    entt::basic_group<Entity, get_t<Get...>, Owned...> group(get_t<Get...>, exclude_t<Exclude...> = {}) {
         static_assert(sizeof...(Owned) + sizeof...(Get) + sizeof...(Exclude) > 1);
         static_assert(sizeof...(Owned) + sizeof...(Get) > 0);
 
@@ -1377,20 +1377,20 @@ public:
 
     /*! @copydoc group */
     template<typename... Owned, typename... Get, typename... Exclude>
-    inline entt::group<Entity, get_t<Get...>, Owned...> group(get_t<Get...>, exclude_t<Exclude...> = {}) const {
+    inline entt::basic_group<Entity, get_t<Get...>, Owned...> group(get_t<Get...>, exclude_t<Exclude...> = {}) const {
         static_assert(std::conjunction_v<std::is_const<Owned>..., std::is_const<Get>...>);
-        return const_cast<registry *>(this)->group<Owned...>(entt::get<Get...>, exclude<Exclude...>);
+        return const_cast<basic_registry *>(this)->group<Owned...>(entt::get<Get...>, exclude<Exclude...>);
     }
 
     /*! @copydoc group */
     template<typename... Owned, typename... Exclude>
-    inline entt::group<Entity, get_t<>, Owned...> group(exclude_t<Exclude...> = {}) {
+    inline entt::basic_group<Entity, get_t<>, Owned...> group(exclude_t<Exclude...> = {}) {
         return group<Owned...>(entt::get<>, exclude<Exclude...>);
     }
 
     /*! @copydoc group */
     template<typename... Owned, typename... Exclude>
-    inline entt::group<Entity, get_t<>, Owned...> group(exclude_t<Exclude...> = {}) const {
+    inline entt::basic_group<Entity, get_t<>, Owned...> group(exclude_t<Exclude...> = {}) const {
         return group<Owned...>(entt::get<>, exclude<Exclude...>);
     }
 
@@ -1415,7 +1415,7 @@ public:
      * @return A newly created runtime view.
      */
     template<typename It>
-    entt::runtime_view<Entity> runtime_view(It first, It last) const {
+    entt::basic_runtime_view<Entity> runtime_view(It first, It last) const {
         static_assert(std::is_convertible_v<typename std::iterator_traits<It>::value_type, component_type>);
         std::vector<const sparse_set<Entity> *> set(std::distance(first, last));
 
@@ -1459,9 +1459,9 @@ public:
      * @return A fresh copy of the registry.
      */
     template<typename... Component>
-    registry clone() const {
+    basic_registry clone() const {
         static_assert(std::conjunction_v<std::is_copy_constructible<Component>...>);
-        registry other;
+        basic_registry other;
 
         other.pools.resize(pools.size());
 
@@ -1493,11 +1493,11 @@ public:
      *
      * @return A temporary object to use to take snasphosts.
      */
-    entt::snapshot<Entity> snapshot() const ENTT_NOEXCEPT {
-        using follow_fn_type = entity_type(const registry &, const entity_type);
+    entt::basic_snapshot<Entity> snapshot() const ENTT_NOEXCEPT {
+        using follow_fn_type = entity_type(const basic_registry &, const entity_type);
         const entity_type seed = available ? (next | (entities[next] & (traits_type::version_mask << traits_type::entity_shift))) : next;
 
-        follow_fn_type *follow = [](const registry &reg, const entity_type entity) -> entity_type {
+        follow_fn_type *follow = [](const basic_registry &reg, const entity_type entity) -> entity_type {
             const auto &entities = reg.entities;
             const auto entt = entity & traits_type::entity_mask;
             const auto next = entities[entt] & traits_type::entity_mask;
@@ -1522,10 +1522,10 @@ public:
      *
      * @return A temporary object to use to load snasphosts.
      */
-    snapshot_loader<Entity> loader() ENTT_NOEXCEPT {
-        using assure_fn_type = void(registry &, const entity_type, const bool);
+    basic_snapshot_loader<Entity> loader() ENTT_NOEXCEPT {
+        using assure_fn_type = void(basic_registry &, const entity_type, const bool);
 
-        assure_fn_type *assure = [](registry &registry, const entity_type entity, const bool destroyed) {
+        assure_fn_type *assure = [](basic_registry &registry, const entity_type entity, const bool destroyed) {
             using promotion_type = std::conditional_t<sizeof(size_type) >= sizeof(entity_type), size_type, entity_type>;
             // explicit promotion to avoid warnings with std::uint16_t
             const auto entt = promotion_type{entity} & traits_type::entity_mask;

+ 36 - 42
src/entt/entity/snapshot.hpp

@@ -12,18 +12,12 @@
 #include "../config/config.h"
 #include "entt_traits.hpp"
 #include "entity.hpp"
+#include "fwd.hpp"
 
 
 namespace entt {
 
 
-/**
- * @brief Forward declaration of the registry class.
- */
-template<typename>
-class registry;
-
-
 /**
  * @brief Utility class to create snapshots from a registry.
  *
@@ -35,13 +29,13 @@ class registry;
  * @tparam Entity A valid entity type (see entt_traits for more details).
  */
 template<typename Entity>
-class snapshot {
+class basic_snapshot {
     /*! @brief A registry is allowed to create snapshots. */
-    friend class registry<Entity>;
+    friend class basic_registry<Entity>;
 
-    using follow_fn_type = Entity(const registry<Entity> &, const Entity);
+    using follow_fn_type = Entity(const basic_registry<Entity> &, const Entity);
 
-    snapshot(const registry<Entity> &reg, Entity seed, follow_fn_type *follow) ENTT_NOEXCEPT
+    basic_snapshot(const basic_registry<Entity> &reg, Entity seed, follow_fn_type *follow) ENTT_NOEXCEPT
         : reg{reg},
           seed{seed},
           follow{follow}
@@ -75,10 +69,10 @@ class snapshot {
 
 public:
     /*! @brief Default move constructor. */
-    snapshot(snapshot &&) = default;
+    basic_snapshot(basic_snapshot &&) = default;
 
     /*! @brief Default move assignment operator. @return This snapshot. */
-    snapshot & operator=(snapshot &&) = default;
+    basic_snapshot & operator=(basic_snapshot &&) = default;
 
     /**
      * @brief Puts aside all the entities that are still in use.
@@ -91,7 +85,7 @@ public:
      * @return An object of this type to continue creating the snapshot.
      */
     template<typename Archive>
-    const snapshot & entities(Archive &archive) const {
+    const basic_snapshot & entities(Archive &archive) const {
         archive(static_cast<Entity>(reg.alive()));
         reg.each([&archive](const auto entity) { archive(entity); });
         return *this;
@@ -108,7 +102,7 @@ public:
      * @return An object of this type to continue creating the snapshot.
      */
     template<typename Archive>
-    const snapshot & destroyed(Archive &archive) const {
+    const basic_snapshot & destroyed(Archive &archive) const {
         auto size = reg.size() - reg.alive();
         archive(static_cast<Entity>(size));
 
@@ -137,7 +131,7 @@ public:
      * @return An object of this type to continue creating the snapshot.
      */
     template<typename... Component, typename Archive>
-    const snapshot & component(Archive &archive) const {
+    const basic_snapshot & component(Archive &archive) const {
         if constexpr(sizeof...(Component) == 1) {
             const auto sz = reg.template size<Component...>();
             const auto *entities = reg.template data<Component...>();
@@ -170,13 +164,13 @@ public:
      * @return An object of this type to continue creating the snapshot.
      */
     template<typename... Component, typename Archive, typename It>
-    const snapshot & component(Archive &archive, It first, It last) const {
+    const basic_snapshot & component(Archive &archive, It first, It last) const {
         component<Component...>(archive, first, last, std::make_index_sequence<sizeof...(Component)>{});
         return *this;
     }
 
 private:
-    const registry<Entity> &reg;
+    const basic_registry<Entity> &reg;
     const Entity seed;
     follow_fn_type *follow;
 };
@@ -193,13 +187,13 @@ private:
  * @tparam Entity A valid entity type (see entt_traits for more details).
  */
 template<typename Entity>
-class snapshot_loader {
+class basic_snapshot_loader {
     /*! @brief A registry is allowed to create snapshot loaders. */
-    friend class registry<Entity>;
+    friend class basic_registry<Entity>;
 
-    using force_fn_type = void(registry<Entity> &, const Entity, const bool);
+    using force_fn_type = void(basic_registry<Entity> &, const Entity, const bool);
 
-    snapshot_loader(registry<Entity> &reg, force_fn_type *force) ENTT_NOEXCEPT
+    basic_snapshot_loader(basic_registry<Entity> &reg, force_fn_type *force) ENTT_NOEXCEPT
         : reg{reg},
           force{force}
     {
@@ -236,10 +230,10 @@ class snapshot_loader {
 
 public:
     /*! @brief Default move constructor. */
-    snapshot_loader(snapshot_loader &&) = default;
+    basic_snapshot_loader(basic_snapshot_loader &&) = default;
 
     /*! @brief Default move assignment operator. @return This loader. */
-    snapshot_loader & operator=(snapshot_loader &&) = default;
+    basic_snapshot_loader & operator=(basic_snapshot_loader &&) = default;
 
     /**
      * @brief Restores entities that were in use during serialization.
@@ -252,7 +246,7 @@ public:
      * @return A valid loader to continue restoring data.
      */
     template<typename Archive>
-    const snapshot_loader & entities(Archive &archive) const {
+    const basic_snapshot_loader & entities(Archive &archive) const {
         static constexpr auto destroyed = false;
         assure(archive, destroyed);
         return *this;
@@ -269,7 +263,7 @@ public:
      * @return A valid loader to continue restoring data.
      */
     template<typename Archive>
-    const snapshot_loader & destroyed(Archive &archive) const {
+    const basic_snapshot_loader & destroyed(Archive &archive) const {
         static constexpr auto destroyed = true;
         assure(archive, destroyed);
         return *this;
@@ -289,7 +283,7 @@ public:
      * @return A valid loader to continue restoring data.
      */
     template<typename... Component, typename Archive>
-    const snapshot_loader & component(Archive &archive) const {
+    const basic_snapshot_loader & component(Archive &archive) const {
         (assign<Component>(archive), ...);
         return *this;
     }
@@ -304,7 +298,7 @@ public:
      *
      * @return A valid loader to continue restoring data.
      */
-    const snapshot_loader & orphans() const {
+    const basic_snapshot_loader & orphans() const {
         reg.orphans([this](const auto entity) {
             reg.destroy(entity);
         });
@@ -313,7 +307,7 @@ public:
     }
 
 private:
-    registry<Entity> &reg;
+    basic_registry<Entity> &reg;
     force_fn_type *force;
 };
 
@@ -335,7 +329,7 @@ private:
  * @tparam Entity A valid entity type (see entt_traits for more details).
  */
 template<typename Entity>
-class continuous_loader {
+class basic_continuous_loader {
     using traits_type = entt_traits<Entity>;
 
     void destroy(Entity entity) {
@@ -380,7 +374,7 @@ class continuous_loader {
     }
 
     template<typename Archive>
-    void assure(Archive &archive, void(continuous_loader:: *member)(Entity)) {
+    void assure(Archive &archive, void(basic_continuous_loader:: *member)(Entity)) {
         Entity length{};
         archive(length);
 
@@ -425,15 +419,15 @@ public:
      * @brief Constructs a loader that is bound to a given registry.
      * @param reg A valid reference to a registry.
      */
-    continuous_loader(registry<entity_type> &reg) ENTT_NOEXCEPT
+    basic_continuous_loader(basic_registry<entity_type> &reg) ENTT_NOEXCEPT
         : reg{reg}
     {}
 
     /*! @brief Default move constructor. */
-    continuous_loader(continuous_loader &&) = default;
+    basic_continuous_loader(basic_continuous_loader &&) = default;
 
     /*! @brief Default move assignment operator. @return This loader. */
-    continuous_loader & operator=(continuous_loader &&) = default;
+    basic_continuous_loader & operator=(basic_continuous_loader &&) = default;
 
     /**
      * @brief Restores entities that were in use during serialization.
@@ -446,8 +440,8 @@ public:
      * @return A non-const reference to this loader.
      */
     template<typename Archive>
-    continuous_loader & entities(Archive &archive) {
-        assure(archive, &continuous_loader::restore);
+    basic_continuous_loader & entities(Archive &archive) {
+        assure(archive, &basic_continuous_loader::restore);
         return *this;
     }
 
@@ -462,8 +456,8 @@ public:
      * @return A non-const reference to this loader.
      */
     template<typename Archive>
-    continuous_loader & destroyed(Archive &archive) {
-        assure(archive, &continuous_loader::destroy);
+    basic_continuous_loader & destroyed(Archive &archive) {
+        assure(archive, &basic_continuous_loader::destroy);
         return *this;
     }
 
@@ -487,7 +481,7 @@ public:
      * @return A non-const reference to this loader.
      */
     template<typename... Component, typename Archive, typename... Type, typename... Member>
-    continuous_loader & component(Archive &archive, Member Type:: *... member) {
+    basic_continuous_loader & component(Archive &archive, Member Type:: *... member) {
         auto apply = [this](const auto entity, const auto &component) {
             reg.template assign_or_replace<std::decay_t<decltype(component)>>(entity, component);
         };
@@ -505,7 +499,7 @@ public:
      *
      * @return A non-const reference to this loader.
      */
-    continuous_loader & shrink() {
+    basic_continuous_loader & shrink() {
         auto it = remloc.begin();
 
         while(it != remloc.cend()) {
@@ -537,7 +531,7 @@ public:
      *
      * @return A non-const reference to this loader.
      */
-    continuous_loader & orphans() {
+    basic_continuous_loader & orphans() {
         reg.orphans([this](const auto entity) {
             reg.destroy(entity);
         });
@@ -572,7 +566,7 @@ public:
 
 private:
     std::unordered_map<Entity, std::pair<Entity, bool>> remloc;
-    registry<Entity> &reg;
+    basic_registry<Entity> &reg;
 };
 
 

+ 12 - 18
src/entt/entity/view.hpp

@@ -14,18 +14,12 @@
 #include "../core/type_traits.hpp"
 #include "entt_traits.hpp"
 #include "sparse_set.hpp"
+#include "fwd.hpp"
 
 
 namespace entt {
 
 
-/**
- * @brief Forward declaration of the registry class.
- */
-template<typename>
-class registry;
-
-
 /**
  * @brief Multi component view.
  *
@@ -63,11 +57,11 @@ class registry;
  * @tparam Component Types of components iterated by the view.
  */
 template<typename Entity, typename... Component>
-class view {
+class basic_view {
     static_assert(sizeof...(Component) > 1);
 
     /*! @brief A registry is allowed to create views. */
-    friend class registry<Entity>;
+    friend class basic_registry<Entity>;
 
     template<typename Comp>
     using pool_type = std::conditional_t<std::is_const_v<Comp>, const sparse_set<Entity, std::remove_const_t<Comp>>, sparse_set<Entity, Comp>>;
@@ -80,7 +74,7 @@ class view {
     using traits_type = entt_traits<Entity>;
 
     class iterator {
-        friend class view<Entity, Component...>;
+        friend class basic_view<Entity, Component...>;
 
         using extent_type = typename sparse_set<Entity>::size_type;
 
@@ -151,7 +145,7 @@ class view {
     };
 
     // we could use pool_type<Component> *..., but vs complains about it and refuses to compile for unknown reasons (likely a bug)
-    view(sparse_set<Entity, std::remove_const_t<Component>> *... pools) ENTT_NOEXCEPT
+    basic_view(sparse_set<Entity, std::remove_const_t<Component>> *... pools) ENTT_NOEXCEPT
         : pools{pools...}
     {}
 
@@ -420,13 +414,13 @@ private:
  * @tparam Component Type of component iterated by the view.
  */
 template<typename Entity, typename Component>
-class view<Entity, Component> {
+class basic_view<Entity, Component> {
     /*! @brief A registry is allowed to create views. */
-    friend class registry<Entity>;
+    friend class basic_registry<Entity>;
 
     using pool_type = std::conditional_t<std::is_const_v<Component>, const sparse_set<Entity, std::remove_const_t<Component>>, sparse_set<Entity, Component>>;
 
-    view(pool_type *pool) ENTT_NOEXCEPT
+    basic_view(pool_type *pool) ENTT_NOEXCEPT
         : pool{pool}
     {}
 
@@ -650,16 +644,16 @@ private:
  * @tparam Entity A valid entity type (see entt_traits for more details).
  */
 template<typename Entity>
-class runtime_view {
+class basic_runtime_view {
     /*! @brief A registry is allowed to create views. */
-    friend class registry<Entity>;
+    friend class basic_registry<Entity>;
 
     using underlying_iterator_type = typename sparse_set<Entity>::iterator_type;
     using extent_type = typename sparse_set<Entity>::size_type;
     using traits_type = entt_traits<Entity>;
 
     class iterator {
-        friend class runtime_view<Entity>;
+        friend class basic_runtime_view<Entity>;
 
         iterator(underlying_iterator_type begin, underlying_iterator_type end, const sparse_set<Entity> * const *first, const sparse_set<Entity> * const *last, extent_type extent) ENTT_NOEXCEPT
             : begin{begin},
@@ -724,7 +718,7 @@ class runtime_view {
         extent_type extent;
     };
 
-    runtime_view(std::vector<const sparse_set<Entity> *> others) ENTT_NOEXCEPT
+    basic_runtime_view(std::vector<const sparse_set<Entity> *> others) ENTT_NOEXCEPT
         : pools{std::move(others)}
     {
         const auto it = std::min_element(pools.begin(), pools.end(), [](const auto *lhs, const auto *rhs) {

+ 3 - 0
src/entt/fwd.hpp

@@ -0,0 +1,3 @@
+#include "entity/fwd.hpp"
+#include "resource/fwd.hpp"
+#include "signal/fwd.hpp"

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

@@ -10,6 +10,7 @@
 #include "../core/hashed_string.hpp"
 #include "handle.hpp"
 #include "loader.hpp"
+#include "fwd.hpp"
 
 
 namespace entt {

+ 27 - 0
src/entt/resource/fwd.hpp

@@ -0,0 +1,27 @@
+#ifndef ENTT_RESOURCE_FWD_HPP
+#define ENTT_RESOURCE_FWD_HPP
+
+
+#include "../config/config.h"
+
+
+namespace entt {
+
+
+/*! @brief Forward declaration of the resource cache class. */
+template<typename>
+class resource_cache;
+
+/*! @brief Forward declaration of the resource handle class. */
+template<typename>
+class resource_handle;
+
+/*! @brief Forward declaration of the resource loader class. */
+template<typename, typename>
+class resource_loader;
+
+
+}
+
+
+#endif // ENTT_RESOURCE_FWD_HPP

+ 1 - 4
src/entt/resource/handle.hpp

@@ -6,15 +6,12 @@
 #include <utility>
 #include <cassert>
 #include "../config/config.h"
+#include "fwd.hpp"
 
 
 namespace entt {
 
 
-template<typename Resource>
-class resource_cache;
-
-
 /**
  * @brief Shared resource handle.
  *

+ 1 - 4
src/entt/resource/loader.hpp

@@ -3,15 +3,12 @@
 
 
 #include <memory>
+#include "fwd.hpp"
 
 
 namespace entt {
 
 
-template<typename Resource>
-class resource_cache;
-
-
 /**
  * @brief Base class for resource loaders.
  *

+ 27 - 0
src/entt/signal/fwd.hpp

@@ -0,0 +1,27 @@
+#ifndef ENTT_SIGNAL_FWD_HPP
+#define ENTT_SIGNAL_FWD_HPP
+
+
+#include "../config/config.h"
+
+
+namespace entt {
+
+
+/*! @brief Forward declaration of the delegate class. */
+template<typename>
+class delegate;
+
+/*! @brief Forward declaration of the sink class. */
+template<typename>
+class sink;
+
+/*! @brief Forward declaration of the sigh class. */
+template<typename, typename>
+struct sigh;
+
+
+}
+
+
+#endif // ENTT_SIGNAL_FWD_HPP

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

@@ -9,6 +9,7 @@
 #include <type_traits>
 #include "../config/config.h"
 #include "delegate.hpp"
+#include "fwd.hpp"
 
 
 namespace entt {

+ 59 - 59
test/benchmark/benchmark.cpp

@@ -32,7 +32,7 @@ private:
 };
 
 TEST(Benchmark, Construct) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     std::cout << "Constructing 1000000 entities" << std::endl;
 
@@ -46,8 +46,8 @@ TEST(Benchmark, Construct) {
 }
 
 TEST(Benchmark, ConstructMany) {
-    entt::registry<> registry;
-    std::vector<entt::registry<>::entity_type> entities(1000000);
+    entt::registry registry;
+    std::vector<entt::entity> entities(1000000);
 
     std::cout << "Constructing 1000000 entities at once" << std::endl;
 
@@ -57,8 +57,8 @@ TEST(Benchmark, ConstructMany) {
 }
 
 TEST(Benchmark, ConstructManyAndAssignComponents) {
-    entt::registry<> registry;
-    std::vector<entt::registry<>::entity_type> entities(1000000);
+    entt::registry registry;
+    std::vector<entt::entity> entities(1000000);
 
     std::cout << "Constructing 1000000 entities at once and assign components" << std::endl;
 
@@ -75,8 +75,8 @@ TEST(Benchmark, ConstructManyAndAssignComponents) {
 }
 
 TEST(Benchmark, ConstructManyWithComponents) {
-    entt::registry<> registry;
-    std::vector<entt::registry<>::entity_type> entities(1000000);
+    entt::registry registry;
+    std::vector<entt::entity> entities(1000000);
 
     std::cout << "Constructing 1000000 entities at once with components" << std::endl;
 
@@ -86,7 +86,7 @@ TEST(Benchmark, ConstructManyWithComponents) {
 }
 
 TEST(Benchmark, Destroy) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     std::cout << "Destroying 1000000 entities" << std::endl;
 
@@ -104,7 +104,7 @@ TEST(Benchmark, Destroy) {
 }
 
 TEST(Benchmark, IterateCreateDeleteSingleComponent) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     std::cout << "Looping 10000 times creating and deleting a random number of entities" << std::endl;
 
@@ -129,7 +129,7 @@ TEST(Benchmark, IterateCreateDeleteSingleComponent) {
 }
 
 TEST(Benchmark, IterateSingleComponent1M) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     std::cout << "Iterating over 1000000 entities, one component" << std::endl;
 
@@ -151,7 +151,7 @@ TEST(Benchmark, IterateSingleComponent1M) {
 }
 
 TEST(Benchmark, IterateSingleComponentRuntime1M) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     std::cout << "Iterating over 1000000 entities, one component, runtime view" << std::endl;
 
@@ -161,7 +161,7 @@ TEST(Benchmark, IterateSingleComponentRuntime1M) {
      }
 
     auto test = [&registry](auto func) {
-        using component_type = typename entt::registry<>::component_type;
+        using component_type = typename entt::registry::component_type;
         component_type types[] = { registry.type<position>() };
 
         timer timer;
@@ -176,7 +176,7 @@ TEST(Benchmark, IterateSingleComponentRuntime1M) {
 }
 
 TEST(Benchmark, IterateTwoComponents1M) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     std::cout << "Iterating over 1000000 entities, two components" << std::endl;
 
@@ -199,7 +199,7 @@ TEST(Benchmark, IterateTwoComponents1M) {
 }
 
 TEST(Benchmark, IterateTwoComponents1MHalf) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     std::cout << "Iterating over 1000000 entities, two components, half of the entities have all the components" << std::endl;
 
@@ -225,7 +225,7 @@ TEST(Benchmark, IterateTwoComponents1MHalf) {
 }
 
 TEST(Benchmark, IterateTwoComponents1MOne) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     std::cout << "Iterating over 1000000 entities, two components, only one entity has all the components" << std::endl;
 
@@ -251,7 +251,7 @@ TEST(Benchmark, IterateTwoComponents1MOne) {
 }
 
 TEST(Benchmark, IterateTwoComponentsNonOwningGroup1M) {
-    entt::registry<> registry;
+    entt::registry registry;
     registry.group<>(entt::get<position, velocity>);
 
     std::cout << "Iterating over 1000000 entities, two components, non owning group" << std::endl;
@@ -275,7 +275,7 @@ TEST(Benchmark, IterateTwoComponentsNonOwningGroup1M) {
 }
 
 TEST(Benchmark, IterateTwoComponentsFullOwningGroup1M) {
-    entt::registry<> registry;
+    entt::registry registry;
     registry.group<position, velocity>();
 
     std::cout << "Iterating over 1000000 entities, two components, full owning group" << std::endl;
@@ -299,7 +299,7 @@ TEST(Benchmark, IterateTwoComponentsFullOwningGroup1M) {
 }
 
 TEST(Benchmark, IterateTwoComponentsPartialOwningGroup1M) {
-    entt::registry<> registry;
+    entt::registry registry;
     registry.group<position>(entt::get<velocity>);
 
     std::cout << "Iterating over 1000000 entities, two components, partial owning group" << std::endl;
@@ -323,7 +323,7 @@ TEST(Benchmark, IterateTwoComponentsPartialOwningGroup1M) {
 }
 
 TEST(Benchmark, IterateTwoComponentsRuntime1M) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     std::cout << "Iterating over 1000000 entities, two components, runtime view" << std::endl;
 
@@ -334,7 +334,7 @@ TEST(Benchmark, IterateTwoComponentsRuntime1M) {
     }
 
     auto test = [&registry](auto func) {
-        using component_type = typename entt::registry<>::component_type;
+        using component_type = typename entt::registry::component_type;
         component_type types[] = { registry.type<position>(), registry.type<velocity>() };
 
         timer timer;
@@ -350,7 +350,7 @@ TEST(Benchmark, IterateTwoComponentsRuntime1M) {
 }
 
 TEST(Benchmark, IterateTwoComponentsRuntime1MHalf) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     std::cout << "Iterating over 1000000 entities, two components, half of the entities have all the components, runtime view" << std::endl;
 
@@ -364,7 +364,7 @@ TEST(Benchmark, IterateTwoComponentsRuntime1MHalf) {
     }
 
     auto test = [&registry](auto func) {
-        using component_type = typename entt::registry<>::component_type;
+        using component_type = typename entt::registry::component_type;
         component_type types[] = { registry.type<position>(), registry.type<velocity>() };
 
         timer timer;
@@ -380,7 +380,7 @@ TEST(Benchmark, IterateTwoComponentsRuntime1MHalf) {
 }
 
 TEST(Benchmark, IterateTwoComponentsRuntime1MOne) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     std::cout << "Iterating over 1000000 entities, two components, only one entity has all the components, runtime view" << std::endl;
 
@@ -394,7 +394,7 @@ TEST(Benchmark, IterateTwoComponentsRuntime1MOne) {
     }
 
     auto test = [&registry](auto func) {
-        using component_type = typename entt::registry<>::component_type;
+        using component_type = typename entt::registry::component_type;
         component_type types[] = { registry.type<position>(), registry.type<velocity>() };
 
         timer timer;
@@ -410,7 +410,7 @@ TEST(Benchmark, IterateTwoComponentsRuntime1MOne) {
 }
 
 TEST(Benchmark, IterateThreeComponents1M) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     std::cout << "Iterating over 1000000 entities, three components" << std::endl;
 
@@ -434,7 +434,7 @@ TEST(Benchmark, IterateThreeComponents1M) {
 }
 
 TEST(Benchmark, IterateThreeComponents1MHalf) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     std::cout << "Iterating over 1000000 entities, three components, half of the entities have all the components" << std::endl;
 
@@ -461,7 +461,7 @@ TEST(Benchmark, IterateThreeComponents1MHalf) {
 }
 
 TEST(Benchmark, IterateThreeComponents1MOne) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     std::cout << "Iterating over 1000000 entities, three components, only one entity has all the components" << std::endl;
 
@@ -488,7 +488,7 @@ TEST(Benchmark, IterateThreeComponents1MOne) {
 }
 
 TEST(Benchmark, IterateThreeComponentsNonOwningGroup1M) {
-    entt::registry<> registry;
+    entt::registry registry;
     registry.group<>(entt::get<position, velocity, comp<0>>);
 
     std::cout << "Iterating over 1000000 entities, three components, non owning group" << std::endl;
@@ -513,7 +513,7 @@ TEST(Benchmark, IterateThreeComponentsNonOwningGroup1M) {
 }
 
 TEST(Benchmark, IterateThreeComponentsFullOwningGroup1M) {
-    entt::registry<> registry;
+    entt::registry registry;
     registry.group<position, velocity, comp<0>>();
 
     std::cout << "Iterating over 1000000 entities, three components, full owning group" << std::endl;
@@ -538,7 +538,7 @@ TEST(Benchmark, IterateThreeComponentsFullOwningGroup1M) {
 }
 
 TEST(Benchmark, IterateThreeComponentsPartialOwningGroup1M) {
-    entt::registry<> registry;
+    entt::registry registry;
     registry.group<position, velocity>(entt::get<comp<0>>);
 
     std::cout << "Iterating over 1000000 entities, three components, partial owning group" << std::endl;
@@ -563,7 +563,7 @@ TEST(Benchmark, IterateThreeComponentsPartialOwningGroup1M) {
 }
 
 TEST(Benchmark, IterateThreeComponentsRuntime1M) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     std::cout << "Iterating over 1000000 entities, three components, runtime view" << std::endl;
 
@@ -575,7 +575,7 @@ TEST(Benchmark, IterateThreeComponentsRuntime1M) {
     }
 
     auto test = [&registry](auto func) {
-        using component_type = typename entt::registry<>::component_type;
+        using component_type = typename entt::registry::component_type;
         component_type types[] = { registry.type<position>(), registry.type<velocity>(), registry.type<comp<0>>() };
 
         timer timer;
@@ -592,7 +592,7 @@ TEST(Benchmark, IterateThreeComponentsRuntime1M) {
 }
 
 TEST(Benchmark, IterateThreeComponentsRuntime1MHalf) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     std::cout << "Iterating over 1000000 entities, three components, half of the entities have all the components, runtime view" << std::endl;
 
@@ -607,7 +607,7 @@ TEST(Benchmark, IterateThreeComponentsRuntime1MHalf) {
     }
 
     auto test = [&registry](auto func) {
-        using component_type = typename entt::registry<>::component_type;
+        using component_type = typename entt::registry::component_type;
         component_type types[] = { registry.type<position>(), registry.type<velocity>(), registry.type<comp<0>>() };
 
         timer timer;
@@ -624,7 +624,7 @@ TEST(Benchmark, IterateThreeComponentsRuntime1MHalf) {
 }
 
 TEST(Benchmark, IterateThreeComponentsRuntime1MOne) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     std::cout << "Iterating over 1000000 entities, three components, only one entity has all the components, runtime view" << std::endl;
 
@@ -639,7 +639,7 @@ TEST(Benchmark, IterateThreeComponentsRuntime1MOne) {
     }
 
     auto test = [&registry](auto func) {
-        using component_type = typename entt::registry<>::component_type;
+        using component_type = typename entt::registry::component_type;
         component_type types[] = { registry.type<position>(), registry.type<velocity>(), registry.type<comp<0>>() };
 
         timer timer;
@@ -656,7 +656,7 @@ TEST(Benchmark, IterateThreeComponentsRuntime1MOne) {
 }
 
 TEST(Benchmark, IterateFiveComponents1M) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     std::cout << "Iterating over 1000000 entities, five components" << std::endl;
 
@@ -682,7 +682,7 @@ TEST(Benchmark, IterateFiveComponents1M) {
 }
 
 TEST(Benchmark, IterateFiveComponents1MHalf) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     std::cout << "Iterating over 1000000 entities, five components, half of the entities have all the components" << std::endl;
 
@@ -711,7 +711,7 @@ TEST(Benchmark, IterateFiveComponents1MHalf) {
 }
 
 TEST(Benchmark, IterateFiveComponents1MOne) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     std::cout << "Iterating over 1000000 entities, five components, only one entity has all the components" << std::endl;
 
@@ -740,7 +740,7 @@ TEST(Benchmark, IterateFiveComponents1MOne) {
 }
 
 TEST(Benchmark, IterateFiveComponentsNonOwningGroup1M) {
-    entt::registry<> registry;
+    entt::registry registry;
     registry.group<>(entt::get<position, velocity, comp<0>, comp<1>, comp<2>>);
 
     std::cout << "Iterating over 1000000 entities, five components, non owning group" << std::endl;
@@ -767,7 +767,7 @@ TEST(Benchmark, IterateFiveComponentsNonOwningGroup1M) {
 }
 
 TEST(Benchmark, IterateFiveComponentsFullOwningGroup1M) {
-    entt::registry<> registry;
+    entt::registry registry;
     registry.group<position, velocity, comp<0>, comp<1>, comp<2>>();
 
     std::cout << "Iterating over 1000000 entities, five components, full owning group" << std::endl;
@@ -794,7 +794,7 @@ TEST(Benchmark, IterateFiveComponentsFullOwningGroup1M) {
 }
 
 TEST(Benchmark, IterateFiveComponentsPartialFourOfFiveOwningGroup1M) {
-    entt::registry<> registry;
+    entt::registry registry;
     registry.group<position, velocity, comp<0>, comp<1>>(entt::get<comp<2>>);
 
     std::cout << "Iterating over 1000000 entities, five components, partial (4 of 5) owning group" << std::endl;
@@ -821,7 +821,7 @@ TEST(Benchmark, IterateFiveComponentsPartialFourOfFiveOwningGroup1M) {
 }
 
 TEST(Benchmark, IterateFiveComponentsPartialThreeOfFiveOwningGroup1M) {
-    entt::registry<> registry;
+    entt::registry registry;
     registry.group<position, velocity, comp<0>>(entt::get<comp<1>, comp<2>>);
 
     std::cout << "Iterating over 1000000 entities, five components, partial (3 of 5) owning group" << std::endl;
@@ -848,7 +848,7 @@ TEST(Benchmark, IterateFiveComponentsPartialThreeOfFiveOwningGroup1M) {
 }
 
 TEST(Benchmark, IterateFiveComponentsRuntime1M) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     std::cout << "Iterating over 1000000 entities, five components, runtime view" << std::endl;
 
@@ -862,7 +862,7 @@ TEST(Benchmark, IterateFiveComponentsRuntime1M) {
     }
 
     auto test = [&registry](auto func) {
-        using component_type = typename entt::registry<>::component_type;
+        using component_type = typename entt::registry::component_type;
         component_type types[] = {
             registry.type<position>(),
             registry.type<velocity>(),
@@ -887,7 +887,7 @@ TEST(Benchmark, IterateFiveComponentsRuntime1M) {
 }
 
 TEST(Benchmark, IterateFiveComponentsRuntime1MHalf) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     std::cout << "Iterating over 1000000 entities, five components, half of the entities have all the components, runtime view" << std::endl;
 
@@ -904,7 +904,7 @@ TEST(Benchmark, IterateFiveComponentsRuntime1MHalf) {
     }
 
     auto test = [&registry](auto func) {
-        using component_type = typename entt::registry<>::component_type;
+        using component_type = typename entt::registry::component_type;
         component_type types[] = {
             registry.type<position>(),
             registry.type<velocity>(),
@@ -929,7 +929,7 @@ TEST(Benchmark, IterateFiveComponentsRuntime1MHalf) {
 }
 
 TEST(Benchmark, IterateFiveComponentsRuntime1MOne) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     std::cout << "Iterating over 1000000 entities, five components, only one entity has all the components, runtime view" << std::endl;
 
@@ -946,7 +946,7 @@ TEST(Benchmark, IterateFiveComponentsRuntime1MOne) {
     }
 
     auto test = [&registry](auto func) {
-        using component_type = typename entt::registry<>::component_type;
+        using component_type = typename entt::registry::component_type;
         component_type types[] = {
             registry.type<position>(),
             registry.type<velocity>(),
@@ -971,7 +971,7 @@ TEST(Benchmark, IterateFiveComponentsRuntime1MOne) {
 }
 
 TEST(Benchmark, IteratePathological) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     std::cout << "Pathological case" << std::endl;
 
@@ -1011,7 +1011,7 @@ TEST(Benchmark, IteratePathological) {
 }
 
 TEST(Benchmark, IteratePathologicalNonOwningGroup) {
-    entt::registry<> registry;
+    entt::registry registry;
     registry.group<>(entt::get<position, velocity, comp<0>>);
 
     std::cout << "Pathological case" << std::endl;
@@ -1052,7 +1052,7 @@ TEST(Benchmark, IteratePathologicalNonOwningGroup) {
 }
 
 TEST(Benchmark, IteratePathologicalFullOwningGroup) {
-    entt::registry<> registry;
+    entt::registry registry;
     registry.group<position, velocity, comp<0>>();
 
     std::cout << "Pathological case" << std::endl;
@@ -1093,7 +1093,7 @@ TEST(Benchmark, IteratePathologicalFullOwningGroup) {
 }
 
 TEST(Benchmark, IteratePathologicalPartialOwningGroup) {
-    entt::registry<> registry;
+    entt::registry registry;
     registry.group<position, velocity>(entt::get<comp<0>>);
 
     std::cout << "Pathological case" << std::endl;
@@ -1134,7 +1134,7 @@ TEST(Benchmark, IteratePathologicalPartialOwningGroup) {
 }
 
 TEST(Benchmark, SortSingle) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     std::cout << "Sort 150000 entities, one component" << std::endl;
 
@@ -1153,7 +1153,7 @@ TEST(Benchmark, SortSingle) {
 }
 
 TEST(Benchmark, SortMulti) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     std::cout << "Sort 150000 entities, two components" << std::endl;
 
@@ -1175,8 +1175,8 @@ TEST(Benchmark, SortMulti) {
 }
 
 TEST(Benchmark, AlmostSortedStdSort) {
-    entt::registry<> registry;
-    entt::registry<>::entity_type entities[3];
+    entt::registry registry;
+    entt::entity entities[3];
 
     std::cout << "Sort 150000 entities, almost sorted, std::sort" << std::endl;
 
@@ -1205,8 +1205,8 @@ TEST(Benchmark, AlmostSortedStdSort) {
 }
 
 TEST(Benchmark, AlmostSortedInsertionSort) {
-    entt::registry<> registry;
-    entt::registry<>::entity_type entities[3];
+    entt::registry registry;
+    entt::entity entities[3];
 
     std::cout << "Sort 150000 entities, almost sorted, insertion sort" << std::endl;
 

+ 2 - 2
test/entt/entity/actor.cpp

@@ -4,7 +4,7 @@
 #include <entt/entity/registry.hpp>
 
 TEST(Actor, Component) {
-    entt::registry<> registry;
+    entt::registry registry;
     entt::actor actor{registry};
 
     ASSERT_EQ(&registry, &actor.backend());
@@ -41,7 +41,7 @@ TEST(Actor, Component) {
 }
 
 TEST(Actor, EntityLifetime) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto *actor = new entt::actor{registry};
     actor->assign<int>();
 

+ 2 - 2
test/entt/entity/entity.cpp

@@ -4,12 +4,12 @@
 #include <entt/entity/registry.hpp>
 
 TEST(Traits, Null) {
-    entt::registry<> registry{};
+    entt::registry registry{};
 
     const auto entity = registry.create();
     registry.assign<int>(entity, 42);
 
-    ASSERT_TRUE(~typename entt::registry<>::entity_type{} == entt::null);
+    ASSERT_TRUE(~entt::entity{} == entt::null);
 
     ASSERT_TRUE(entt::null == entt::null);
     ASSERT_FALSE(entt::null != entt::null);

+ 23 - 23
test/entt/entity/group.cpp

@@ -6,7 +6,7 @@
 #include <entt/entity/group.hpp>
 
 TEST(NonOwningGroup, Functionalities) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto group = registry.group<>(entt::get<int, char>);
     auto cgroup = std::as_const(registry).group<>(entt::get<const int, const char>);
 
@@ -56,7 +56,7 @@ TEST(NonOwningGroup, Functionalities) {
 }
 
 TEST(OwningGroup, Functionalities) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto group = registry.group<int>(entt::get<char>);
     auto cgroup = std::as_const(registry).group<const int>(entt::get<const char>);
 
@@ -109,7 +109,7 @@ TEST(OwningGroup, Functionalities) {
 }
 
 TEST(NonOwningGroup, ElementAccess) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto group = registry.group<>(entt::get<int, char>);
     auto cgroup = std::as_const(registry).group<>(entt::get<const int, const char>);
 
@@ -128,7 +128,7 @@ TEST(NonOwningGroup, ElementAccess) {
 }
 
 TEST(OwningGroup, ElementAccess) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto group = registry.group<int>(entt::get<char>);
     auto cgroup = std::as_const(registry).group<const int>(entt::get<const char>);
 
@@ -147,7 +147,7 @@ TEST(OwningGroup, ElementAccess) {
 }
 
 TEST(NonOwningGroup, Contains) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto group = registry.group<>(entt::get<int, char>);
 
     const auto e0 = registry.create();
@@ -165,7 +165,7 @@ TEST(NonOwningGroup, Contains) {
 }
 
 TEST(OwningGroup, Contains) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto group = registry.group<int>(entt::get<char>);
 
     const auto e0 = registry.create();
@@ -183,7 +183,7 @@ TEST(OwningGroup, Contains) {
 }
 
 TEST(NonOwningGroup, Empty) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     const auto e0 = registry.create();
     registry.assign<double>(e0);
@@ -206,7 +206,7 @@ TEST(NonOwningGroup, Empty) {
 }
 
 TEST(OwningGroup, Empty) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     const auto e0 = registry.create();
     registry.assign<double>(e0);
@@ -229,7 +229,7 @@ TEST(OwningGroup, Empty) {
 }
 
 TEST(NonOwningGroup, Each) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto group = registry.group<>(entt::get<int, char>);
 
     const auto e0 = registry.create();
@@ -255,7 +255,7 @@ TEST(NonOwningGroup, Each) {
 }
 
 TEST(OwningGroup, Each) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto group = registry.group<int>(entt::get<char>);
 
     const auto e0 = registry.create();
@@ -281,7 +281,7 @@ TEST(OwningGroup, Each) {
 }
 
 TEST(NonOwningGroup, Sort) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto group = registry.group<>(entt::get<const int, unsigned int>);
 
     const auto e0 = registry.create();
@@ -314,7 +314,7 @@ TEST(NonOwningGroup, Sort) {
 }
 
 TEST(NonOwningGroup, IndexRebuiltOnDestroy) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto group = registry.group<>(entt::get<int, unsigned int>);
 
     const auto e0 = registry.create();
@@ -342,7 +342,7 @@ TEST(NonOwningGroup, IndexRebuiltOnDestroy) {
 }
 
 TEST(OwningGroup, IndexRebuiltOnDestroy) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto group = registry.group<int>(entt::get<unsigned int>);
 
     const auto e0 = registry.create();
@@ -370,7 +370,7 @@ TEST(OwningGroup, IndexRebuiltOnDestroy) {
 }
 
 TEST(NonOwningGroup, ConstNonConstAndAllInBetween) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto group = registry.group<>(entt::get<int, const char>);
 
     ASSERT_EQ(group.size(), decltype(group.size()){0});
@@ -394,7 +394,7 @@ TEST(NonOwningGroup, ConstNonConstAndAllInBetween) {
 }
 
 TEST(OwningGroup, ConstNonConstAndAllInBetween) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto group = registry.group<int, const char>(entt::get<double, const float>);
 
     ASSERT_EQ(group.size(), decltype(group.size()){0});
@@ -425,7 +425,7 @@ TEST(OwningGroup, ConstNonConstAndAllInBetween) {
 }
 
 TEST(NonOwningGroup, Find) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto group = registry.group<>(entt::get<int, const char>);
 
     const auto e0 = registry.create();
@@ -470,7 +470,7 @@ TEST(NonOwningGroup, Find) {
 }
 
 TEST(OwningGroup, Find) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto group = registry.group<int>(entt::get<const char>);
 
     const auto e0 = registry.create();
@@ -515,7 +515,7 @@ TEST(OwningGroup, Find) {
 }
 
 TEST(NonOwningGroup, ExcludedComponents) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     const auto e0 = registry.create();
     registry.assign<int>(e0, 0);
@@ -563,7 +563,7 @@ TEST(NonOwningGroup, ExcludedComponents) {
 }
 
 TEST(OwningGroup, ExcludedComponents) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     const auto e0 = registry.create();
     registry.assign<int>(e0, 0);
@@ -612,7 +612,7 @@ TEST(OwningGroup, ExcludedComponents) {
 
 TEST(NonOwningGroup, EmptyAndNonEmptyTypes) {
     struct empty_type {};
-    entt::registry<> registry;
+    entt::registry registry;
     const auto group = registry.group<>(entt::get<int, empty_type>);
 
     const auto e0 = registry.create();
@@ -639,7 +639,7 @@ TEST(NonOwningGroup, EmptyAndNonEmptyTypes) {
 
 TEST(OwningGroup, EmptyAndNonEmptyTypes) {
     struct empty_type {};
-    entt::registry<> registry;
+    entt::registry registry;
     const auto group = registry.group<empty_type>(entt::get<int>);
 
     const auto e0 = registry.create();
@@ -665,7 +665,7 @@ TEST(OwningGroup, EmptyAndNonEmptyTypes) {
 }
 
 TEST(NonOwningGroup, TrackEntitiesOnComponentDestruction) {
-    entt::registry<> registry;
+    entt::registry registry;
     const auto group = registry.group<>(entt::get<int>, entt::exclude<char>);
     const auto cgroup = std::as_const(registry).group<>(entt::get<const int>, entt::exclude<char>);
 
@@ -683,7 +683,7 @@ TEST(NonOwningGroup, TrackEntitiesOnComponentDestruction) {
 }
 
 TEST(OwningGroup, TrackEntitiesOnComponentDestruction) {
-    entt::registry<> registry;
+    entt::registry registry;
     const auto group = registry.group<int>(entt::exclude<char>);
     const auto cgroup = std::as_const(registry).group<const int>(entt::exclude<char>);
 

+ 13 - 17
test/entt/entity/helper.cpp

@@ -5,29 +5,25 @@
 #include <entt/core/type_traits.hpp>
 
 TEST(Helper, AsView) {
-    using entity_type = typename entt::registry<>::entity_type;
+    entt::registry registry;
+    const entt::registry cregistry;
 
-    entt::registry<> registry;
-    const entt::registry<> cregistry;
-
-    ([](entt::view<entity_type, int, char>) {})(entt::as_view{registry});
-    ([](entt::view<entity_type, const int, char>) {})(entt::as_view{registry});
-    ([](entt::view<entity_type, const double>) {})(entt::as_view{cregistry});
+    ([](entt::view<int, char>) {})(entt::as_view{registry});
+    ([](entt::view<const int, char>) {})(entt::as_view{registry});
+    ([](entt::view<const double>) {})(entt::as_view{cregistry});
 }
 
 TEST(Helper, AsGroup) {
-    using entity_type = typename entt::registry<>::entity_type;
-
-    entt::registry<> registry;
-    const entt::registry<> cregistry;
+    entt::registry registry;
+    const entt::registry cregistry;
 
-    ([](entt::group<entity_type, entt::get_t<>, double, float>) {})(entt::as_group{registry});
-    ([](entt::group<entity_type, entt::get_t<>, const double, float>) {})(entt::as_group{registry});
-    ([](entt::group<entity_type, entt::get_t<>, const double, const float>) {})(entt::as_group{cregistry});
+    ([](entt::group<entt::get_t<>, double, float>) {})(entt::as_group{registry});
+    ([](entt::group<entt::get_t<>, const double, float>) {})(entt::as_group{registry});
+    ([](entt::group<entt::get_t<>, const double, const float>) {})(entt::as_group{cregistry});
 }
 
 TEST(Helper, Dependency) {
-    entt::registry<> registry;
+    entt::registry registry;
     const auto entity = registry.create();
     entt::connect<double, float>(registry.construction<int>());
 
@@ -73,7 +69,7 @@ TEST(Helper, Dependency) {
 }
 
 TEST(Dependency, MultipleListenersOnTheSameType) {
-    entt::registry<> registry;
+    entt::registry registry;
     entt::connect<double>(registry.construction<int>());
     entt::connect<char>(registry.construction<int>());
 
@@ -85,7 +81,7 @@ TEST(Dependency, MultipleListenersOnTheSameType) {
 }
 
 TEST(Helper, Label) {
-    entt::registry<> registry;
+    entt::registry registry;
     const auto entity = registry.create();
     registry.assign<entt::label<"foobar"_hs>>(entity);
     registry.assign<int>(entity, 42);

+ 7 - 7
test/entt/entity/prototype.cpp

@@ -3,7 +3,7 @@
 #include <entt/entity/registry.hpp>
 
 TEST(Prototype, SameRegistry) {
-    entt::registry<> registry;
+    entt::registry registry;
     entt::prototype prototype{registry};
 
     ASSERT_EQ(&registry, &prototype.backend());
@@ -71,8 +71,8 @@ TEST(Prototype, SameRegistry) {
 }
 
 TEST(Prototype, OtherRegistry) {
-    entt::registry<> registry;
-    entt::registry<> repository;
+    entt::registry registry;
+    entt::registry repository;
     entt::prototype prototype{repository};
 
     ASSERT_TRUE(registry.empty());
@@ -130,7 +130,7 @@ TEST(Prototype, OtherRegistry) {
 }
 
 TEST(Prototype, RAII) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     {
         entt::prototype prototype{registry};
@@ -143,19 +143,19 @@ TEST(Prototype, RAII) {
 }
 
 TEST(Prototype, MoveConstructionAssignment) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     entt::prototype prototype{registry};
     prototype.set<int>(0);
     auto other{std::move(prototype)};
     const auto e0 = other();
 
-    ASSERT_EQ(registry.size(), entt::registry<>::size_type{2});
+    ASSERT_EQ(registry.size(), entt::registry::size_type{2});
     ASSERT_TRUE(registry.has<int>(e0));
 
     prototype = std::move(other);
     const auto e1 = prototype();
 
-    ASSERT_EQ(registry.size(), entt::registry<>::size_type{3});
+    ASSERT_EQ(registry.size(), entt::registry::size_type{3});
     ASSERT_TRUE(registry.has<int>(e1));
 }

+ 130 - 132
test/entt/entity/registry.cpp

@@ -12,7 +12,7 @@ ENTT_SHARED_TYPE(int)
 
 struct listener {
     template<typename Component>
-    void incr(entt::registry<> &registry, entt::registry<>::entity_type entity) {
+    void incr(entt::registry &registry, entt::entity entity) {
         ASSERT_TRUE(registry.valid(entity));
         ASSERT_TRUE(registry.has<Component>(entity));
         last = entity;
@@ -20,38 +20,38 @@ struct listener {
     }
 
     template<typename Component>
-    void decr(entt::registry<> &registry, entt::registry<>::entity_type entity) {
+    void decr(entt::registry &registry, entt::entity entity) {
         ASSERT_TRUE(registry.valid(entity));
         ASSERT_TRUE(registry.has<Component>(entity));
         last = entity;
         --counter;
     }
 
-    entt::registry<>::entity_type last;
+    entt::entity last;
     int counter{0};
 };
 
 TEST(Registry, Types) {
-    entt::registry<> registry;
+    entt::registry registry;
     ASSERT_EQ(registry.type<int>(), registry.type<int>());
     ASSERT_NE(registry.type<double>(), registry.type<int>());
 }
 
 TEST(Registry, Functionalities) {
-    entt::registry<> registry;
+    entt::registry registry;
 
-    ASSERT_EQ(registry.size(), entt::registry<>::size_type{0});
-    ASSERT_EQ(registry.alive(), entt::registry<>::size_type{0});
+    ASSERT_EQ(registry.size(), entt::registry::size_type{0});
+    ASSERT_EQ(registry.alive(), entt::registry::size_type{0});
     ASSERT_NO_THROW(registry.reserve(42));
     ASSERT_NO_THROW(registry.reserve<int>(8));
     ASSERT_NO_THROW(registry.reserve<char>(8));
     ASSERT_TRUE(registry.empty());
 
-    ASSERT_EQ(registry.capacity(), entt::registry<>::size_type{42});
-    ASSERT_EQ(registry.capacity<int>(), entt::registry<>::size_type{8});
-    ASSERT_EQ(registry.capacity<char>(), entt::registry<>::size_type{8});
-    ASSERT_EQ(registry.size<int>(), entt::registry<>::size_type{0});
-    ASSERT_EQ(registry.size<char>(), entt::registry<>::size_type{0});
+    ASSERT_EQ(registry.capacity(), entt::registry::size_type{42});
+    ASSERT_EQ(registry.capacity<int>(), entt::registry::size_type{8});
+    ASSERT_EQ(registry.capacity<char>(), entt::registry::size_type{8});
+    ASSERT_EQ(registry.size<int>(), entt::registry::size_type{0});
+    ASSERT_EQ(registry.size<char>(), entt::registry::size_type{0});
     ASSERT_TRUE(registry.empty<int>());
     ASSERT_TRUE(registry.empty<char>());
 
@@ -64,8 +64,8 @@ TEST(Registry, Functionalities) {
     ASSERT_TRUE(registry.has<>(e0));
     ASSERT_TRUE(registry.has<>(e1));
 
-    ASSERT_EQ(registry.size<int>(), entt::registry<>::size_type{1});
-    ASSERT_EQ(registry.size<char>(), entt::registry<>::size_type{1});
+    ASSERT_EQ(registry.size<int>(), entt::registry::size_type{1});
+    ASSERT_EQ(registry.size<char>(), entt::registry::size_type{1});
     ASSERT_FALSE(registry.empty<int>());
     ASSERT_FALSE(registry.empty<char>());
 
@@ -115,8 +115,8 @@ TEST(Registry, Functionalities) {
 
     ASSERT_EQ(std::get<0>(registry.get<int, char>(e0)), 42);
     ASSERT_EQ(*std::get<0>(registry.try_get<int, char, double>(e0)), 42);
-    ASSERT_EQ(std::get<1>(static_cast<const entt::registry<> &>(registry).get<int, char>(e0)), 'c');
-    ASSERT_EQ(*std::get<1>(static_cast<const entt::registry<> &>(registry).try_get<int, char, double>(e0)), 'c');
+    ASSERT_EQ(std::get<1>(static_cast<const entt::registry &>(registry).get<int, char>(e0)), 'c');
+    ASSERT_EQ(*std::get<1>(static_cast<const entt::registry &>(registry).try_get<int, char, double>(e0)), 'c');
 
     ASSERT_EQ(registry.get<int>(e0), registry.get<int>(e2));
     ASSERT_EQ(registry.get<char>(e0), registry.get<char>(e2));
@@ -128,18 +128,18 @@ TEST(Registry, Functionalities) {
 
     ASSERT_NO_THROW(registry.assign_or_replace<int>(e0, 1));
     ASSERT_NO_THROW(registry.assign_or_replace<int>(e1, 1));
-    ASSERT_EQ(static_cast<const entt::registry<> &>(registry).get<int>(e0), 1);
-    ASSERT_EQ(static_cast<const entt::registry<> &>(registry).get<int>(e1), 1);
+    ASSERT_EQ(static_cast<const entt::registry &>(registry).get<int>(e0), 1);
+    ASSERT_EQ(static_cast<const entt::registry &>(registry).get<int>(e1), 1);
 
-    ASSERT_EQ(registry.size(), entt::registry<>::size_type{3});
-    ASSERT_EQ(registry.alive(), entt::registry<>::size_type{3});
+    ASSERT_EQ(registry.size(), entt::registry::size_type{3});
+    ASSERT_EQ(registry.alive(), entt::registry::size_type{3});
     ASSERT_FALSE(registry.empty());
 
-    ASSERT_EQ(registry.version(e2), entt::registry<>::version_type{0});
-    ASSERT_EQ(registry.current(e2), entt::registry<>::version_type{0});
+    ASSERT_EQ(registry.version(e2), entt::registry::version_type{0});
+    ASSERT_EQ(registry.current(e2), entt::registry::version_type{0});
     ASSERT_NO_THROW(registry.destroy(e2));
-    ASSERT_EQ(registry.version(e2), entt::registry<>::version_type{0});
-    ASSERT_EQ(registry.current(e2), entt::registry<>::version_type{1});
+    ASSERT_EQ(registry.version(e2), entt::registry::version_type{0});
+    ASSERT_EQ(registry.current(e2), entt::registry::version_type{1});
 
     ASSERT_TRUE(registry.valid(e0));
     ASSERT_TRUE(registry.fast(e0));
@@ -148,14 +148,14 @@ TEST(Registry, Functionalities) {
     ASSERT_FALSE(registry.valid(e2));
     ASSERT_FALSE(registry.fast(e2));
 
-    ASSERT_EQ(registry.size(), entt::registry<>::size_type{3});
-    ASSERT_EQ(registry.alive(), entt::registry<>::size_type{2});
+    ASSERT_EQ(registry.size(), entt::registry::size_type{3});
+    ASSERT_EQ(registry.alive(), entt::registry::size_type{2});
     ASSERT_FALSE(registry.empty());
 
     ASSERT_NO_THROW(registry.reset());
 
-    ASSERT_EQ(registry.size(), entt::registry<>::size_type{3});
-    ASSERT_EQ(registry.alive(), entt::registry<>::size_type{0});
+    ASSERT_EQ(registry.size(), entt::registry::size_type{3});
+    ASSERT_EQ(registry.alive(), entt::registry::size_type{0});
     ASSERT_TRUE(registry.empty());
 
     const auto e3 = registry.create();
@@ -163,8 +163,8 @@ TEST(Registry, Functionalities) {
     ASSERT_EQ(registry.get_or_assign<int>(e3, 3), 3);
     ASSERT_EQ(registry.get_or_assign<char>(e3, 'c'), 'c');
 
-    ASSERT_EQ(registry.size<int>(), entt::registry<>::size_type{1});
-    ASSERT_EQ(registry.size<char>(), entt::registry<>::size_type{1});
+    ASSERT_EQ(registry.size<int>(), entt::registry::size_type{1});
+    ASSERT_EQ(registry.size<char>(), entt::registry::size_type{1});
     ASSERT_FALSE(registry.empty<int>());
     ASSERT_FALSE(registry.empty<char>());
     ASSERT_TRUE(registry.has<int>(e3));
@@ -174,15 +174,15 @@ TEST(Registry, Functionalities) {
 
     ASSERT_NO_THROW(registry.reset<int>());
 
-    ASSERT_EQ(registry.size<int>(), entt::registry<>::size_type{0});
-    ASSERT_EQ(registry.size<char>(), entt::registry<>::size_type{1});
+    ASSERT_EQ(registry.size<int>(), entt::registry::size_type{0});
+    ASSERT_EQ(registry.size<char>(), entt::registry::size_type{1});
     ASSERT_TRUE(registry.empty<int>());
     ASSERT_FALSE(registry.empty<char>());
 
     ASSERT_NO_THROW(registry.reset());
 
-    ASSERT_EQ(registry.size<int>(), entt::registry<>::size_type{0});
-    ASSERT_EQ(registry.size<char>(), entt::registry<>::size_type{0});
+    ASSERT_EQ(registry.size<int>(), entt::registry::size_type{0});
+    ASSERT_EQ(registry.size<char>(), entt::registry::size_type{0});
     ASSERT_TRUE(registry.empty<int>());
     ASSERT_TRUE(registry.empty<char>());
 
@@ -194,13 +194,13 @@ TEST(Registry, Functionalities) {
     ASSERT_NO_THROW(registry.reset<int>(e4));
     ASSERT_NO_THROW(registry.reset<int>(e5));
 
-    ASSERT_EQ(registry.size<int>(), entt::registry<>::size_type{0});
-    ASSERT_EQ(registry.size<char>(), entt::registry<>::size_type{0});
+    ASSERT_EQ(registry.size<int>(), entt::registry::size_type{0});
+    ASSERT_EQ(registry.size<char>(), entt::registry::size_type{0});
     ASSERT_TRUE(registry.empty<int>());
 }
 
 TEST(Registry, Identifiers) {
-    entt::registry<> registry;
+    entt::registry registry;
     const auto pre = registry.create();
 
     ASSERT_EQ(pre, registry.entity(pre));
@@ -216,7 +216,7 @@ TEST(Registry, Identifiers) {
 }
 
 TEST(Registry, RawData) {
-    entt::registry<> registry;
+    entt::registry registry;
     const auto entity = registry.create();
 
     ASSERT_EQ(registry.raw<int>(), nullptr);
@@ -235,7 +235,7 @@ TEST(Registry, RawData) {
 }
 
 TEST(Registry, CreateDestroyCornerCase) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     const auto e0 = registry.create();
     const auto e1 = registry.create();
@@ -245,19 +245,19 @@ TEST(Registry, CreateDestroyCornerCase) {
 
     registry.each([](auto) { FAIL(); });
 
-    ASSERT_EQ(registry.current(e0), entt::registry<>::version_type{1});
-    ASSERT_EQ(registry.current(e1), entt::registry<>::version_type{1});
+    ASSERT_EQ(registry.current(e0), entt::registry::version_type{1});
+    ASSERT_EQ(registry.current(e1), entt::registry::version_type{1});
 }
 
 TEST(Registry, VersionOverflow) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     const auto entity = registry.create();
     registry.destroy(entity);
 
-    ASSERT_EQ(registry.version(entity), entt::registry<>::version_type{});
+    ASSERT_EQ(registry.version(entity), entt::registry::version_type{});
 
-    for(auto i = entt::entt_traits<entt::registry<>::entity_type>::version_mask; i; --i) {
+    for(auto i = entt::entt_traits<entt::entity>::version_mask; i; --i) {
         ASSERT_NE(registry.current(entity), registry.version(entity));
         registry.destroy(registry.create());
     }
@@ -266,9 +266,9 @@ TEST(Registry, VersionOverflow) {
 }
 
 TEST(Registry, Each) {
-    entt::registry<> registry;
-    entt::registry<>::size_type tot;
-    entt::registry<>::size_type match;
+    entt::registry registry;
+    entt::registry::size_type tot;
+    entt::registry::size_type match;
 
     registry.create();
     registry.assign<int>(registry.create());
@@ -319,8 +319,8 @@ TEST(Registry, Each) {
 }
 
 TEST(Registry, Orphans) {
-    entt::registry<> registry;
-    entt::registry<>::size_type tot{};
+    entt::registry registry;
+    entt::registry::size_type tot{};
 
     registry.assign<int>(registry.create());
     registry.create();
@@ -341,8 +341,8 @@ TEST(Registry, Orphans) {
 }
 
 TEST(Registry, CreateDestroyEntities) {
-    entt::registry<> registry;
-    entt::registry<>::entity_type pre{}, post{};
+    entt::registry registry;
+    entt::entity pre{}, post{};
 
     for(int i = 0; i < 10; ++i) {
         const auto entity = registry.create();
@@ -372,7 +372,7 @@ TEST(Registry, CreateDestroyEntities) {
 }
 
 TEST(Registry, View) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto mview = registry.view<int, char>();
     auto iview = registry.view<int>();
     auto cview = registry.view<char>();
@@ -398,7 +398,7 @@ TEST(Registry, View) {
 }
 
 TEST(Registry, NonOwningGroupInitOnFirstUse) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     const auto e0 = registry.create();
     registry.assign<int>(e0, 0);
@@ -424,7 +424,7 @@ TEST(Registry, NonOwningGroupInitOnFirstUse) {
 }
 
 TEST(Registry, NonOwningGroupInitOnAssign) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto group = registry.group<>(entt::get<int, char>);
 
     const auto e0 = registry.create();
@@ -450,7 +450,7 @@ TEST(Registry, NonOwningGroupInitOnAssign) {
 }
 
 TEST(Registry, FullOwningGroupInitOnFirstUse) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     const auto e0 = registry.create();
     registry.assign<int>(e0, 0);
@@ -476,7 +476,7 @@ TEST(Registry, FullOwningGroupInitOnFirstUse) {
 }
 
 TEST(Registry, FullOwningGroupInitOnAssign) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto group = registry.group<int, char>();
 
     const auto e0 = registry.create();
@@ -502,7 +502,7 @@ TEST(Registry, FullOwningGroupInitOnAssign) {
 }
 
 TEST(Registry, PartialOwningGroupInitOnFirstUse) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     const auto e0 = registry.create();
     registry.assign<int>(e0, 0);
@@ -529,7 +529,7 @@ TEST(Registry, PartialOwningGroupInitOnFirstUse) {
 }
 
 TEST(Registry, PartialOwningGroupInitOnAssign) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto group = registry.group<int>(entt::get<char>);
 
     const auto e0 = registry.create();
@@ -555,131 +555,131 @@ TEST(Registry, PartialOwningGroupInitOnAssign) {
 }
 
 TEST(Registry, CleanViewAfterReset) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto view = registry.view<int, char>();
 
     const auto entity = registry.create();
     registry.assign<int>(entity, 0);
     registry.assign<char>(entity, 'c');
 
-    ASSERT_EQ(view.size(), entt::registry<>::size_type{1});
+    ASSERT_EQ(view.size(), entt::registry::size_type{1});
 
     registry.reset<char>(entity);
 
-    ASSERT_EQ(view.size(), entt::registry<>::size_type{0});
+    ASSERT_EQ(view.size(), entt::registry::size_type{0});
 
     registry.assign<char>(entity, 'c');
 
-    ASSERT_EQ(view.size(), entt::registry<>::size_type{1});
+    ASSERT_EQ(view.size(), entt::registry::size_type{1});
 
     registry.reset<int>();
 
-    ASSERT_EQ(view.size(), entt::registry<>::size_type{0});
+    ASSERT_EQ(view.size(), entt::registry::size_type{0});
 
     registry.assign<int>(entity, 0);
 
-    ASSERT_EQ(view.size(), entt::registry<>::size_type{1});
+    ASSERT_EQ(view.size(), entt::registry::size_type{1});
 
     registry.reset();
 
-    ASSERT_EQ(view.size(), entt::registry<>::size_type{0});
+    ASSERT_EQ(view.size(), entt::registry::size_type{0});
 }
 
 TEST(Registry, CleanNonOwningGroupViewAfterReset) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto group = registry.group<>(entt::get<int, char>);
 
     const auto entity = registry.create();
     registry.assign<int>(entity, 0);
     registry.assign<char>(entity, 'c');
 
-    ASSERT_EQ(group.size(), entt::registry<>::size_type{1});
+    ASSERT_EQ(group.size(), entt::registry::size_type{1});
 
     registry.reset<char>(entity);
 
-    ASSERT_EQ(group.size(), entt::registry<>::size_type{0});
+    ASSERT_EQ(group.size(), entt::registry::size_type{0});
 
     registry.assign<char>(entity, 'c');
 
-    ASSERT_EQ(group.size(), entt::registry<>::size_type{1});
+    ASSERT_EQ(group.size(), entt::registry::size_type{1});
 
     registry.reset<int>();
 
-    ASSERT_EQ(group.size(), entt::registry<>::size_type{0});
+    ASSERT_EQ(group.size(), entt::registry::size_type{0});
 
     registry.assign<int>(entity, 0);
 
-    ASSERT_EQ(group.size(), entt::registry<>::size_type{1});
+    ASSERT_EQ(group.size(), entt::registry::size_type{1});
 
     registry.reset();
 
-    ASSERT_EQ(group.size(), entt::registry<>::size_type{0});
+    ASSERT_EQ(group.size(), entt::registry::size_type{0});
 }
 
 TEST(Registry, CleanFullOwningGroupViewAfterReset) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto group = registry.group<int, char>();
 
     const auto entity = registry.create();
     registry.assign<int>(entity, 0);
     registry.assign<char>(entity, 'c');
 
-    ASSERT_EQ(group.size(), entt::registry<>::size_type{1});
+    ASSERT_EQ(group.size(), entt::registry::size_type{1});
 
     registry.reset<char>(entity);
 
-    ASSERT_EQ(group.size(), entt::registry<>::size_type{0});
+    ASSERT_EQ(group.size(), entt::registry::size_type{0});
 
     registry.assign<char>(entity, 'c');
 
-    ASSERT_EQ(group.size(), entt::registry<>::size_type{1});
+    ASSERT_EQ(group.size(), entt::registry::size_type{1});
 
     registry.reset<int>();
 
-    ASSERT_EQ(group.size(), entt::registry<>::size_type{0});
+    ASSERT_EQ(group.size(), entt::registry::size_type{0});
 
     registry.assign<int>(entity, 0);
 
-    ASSERT_EQ(group.size(), entt::registry<>::size_type{1});
+    ASSERT_EQ(group.size(), entt::registry::size_type{1});
 
     registry.reset();
 
-    ASSERT_EQ(group.size(), entt::registry<>::size_type{0});
+    ASSERT_EQ(group.size(), entt::registry::size_type{0});
 }
 
 TEST(Registry, CleanPartialOwningGroupViewAfterReset) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto group = registry.group<int>(entt::get<char>);
 
     const auto entity = registry.create();
     registry.assign<int>(entity, 0);
     registry.assign<char>(entity, 'c');
 
-    ASSERT_EQ(group.size(), entt::registry<>::size_type{1});
+    ASSERT_EQ(group.size(), entt::registry::size_type{1});
 
     registry.reset<char>(entity);
 
-    ASSERT_EQ(group.size(), entt::registry<>::size_type{0});
+    ASSERT_EQ(group.size(), entt::registry::size_type{0});
 
     registry.assign<char>(entity, 'c');
 
-    ASSERT_EQ(group.size(), entt::registry<>::size_type{1});
+    ASSERT_EQ(group.size(), entt::registry::size_type{1});
 
     registry.reset<int>();
 
-    ASSERT_EQ(group.size(), entt::registry<>::size_type{0});
+    ASSERT_EQ(group.size(), entt::registry::size_type{0});
 
     registry.assign<int>(entity, 0);
 
-    ASSERT_EQ(group.size(), entt::registry<>::size_type{1});
+    ASSERT_EQ(group.size(), entt::registry::size_type{1});
 
     registry.reset();
 
-    ASSERT_EQ(group.size(), entt::registry<>::size_type{0});
+    ASSERT_EQ(group.size(), entt::registry::size_type{0});
 }
 
 TEST(Registry, SortSingle) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     int val = 0;
 
@@ -699,7 +699,7 @@ TEST(Registry, SortSingle) {
 }
 
 TEST(Registry, SortMulti) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     unsigned int uval = 0u;
     int ival = 0;
@@ -732,7 +732,7 @@ TEST(Registry, SortMulti) {
 
 TEST(Registry, ComponentsWithTypesFromStandardTemplateLibrary) {
     // see #37 - the test shouldn't crash, that's all
-    entt::registry<> registry;
+    entt::registry registry;
     const auto entity = registry.create();
     registry.assign<std::unordered_set<int>>(entity).insert(42);
     registry.destroy(entity);
@@ -740,18 +740,16 @@ TEST(Registry, ComponentsWithTypesFromStandardTemplateLibrary) {
 
 TEST(Registry, ConstructWithComponents) {
     // it should compile, that's all
-    entt::registry<> registry;
+    entt::registry registry;
     const auto value = 0;
     registry.assign<int>(registry.create(), value);
 }
 
 TEST(Registry, MergeTwoRegistries) {
-    using entity_type = entt::registry<>::entity_type;
+    entt::registry src;
+    entt::registry dst;
 
-    entt::registry<> src;
-    entt::registry<> dst;
-
-    std::unordered_map<entity_type, entity_type> ref;
+    std::unordered_map<entt::entity, entt::entity> ref;
 
     auto merge = [&ref](const auto &view, auto &dst) {
         view.each([&](auto entity, const auto &component) {
@@ -801,7 +799,7 @@ TEST(Registry, MergeTwoRegistries) {
 }
 
 TEST(Registry, Signals) {
-    entt::registry<> registry;
+    entt::registry registry;
     listener listener;
 
     registry.construction<int>().connect<&listener::incr<int>>(&listener);
@@ -855,7 +853,7 @@ TEST(Registry, Signals) {
 }
 
 TEST(Registry, DestroyByComponents) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     const auto e0 = registry.create();
     const auto e1 = registry.create();
@@ -903,7 +901,7 @@ TEST(Registry, DestroyByComponents) {
 }
 
 TEST(Registry, SignalsOnAccommodate) {
-    entt::registry<> registry;
+    entt::registry registry;
     const auto entity = registry.create();
     const auto group = registry.group<>(entt::get<int, char>);
 
@@ -914,8 +912,8 @@ TEST(Registry, SignalsOnAccommodate) {
 }
 
 TEST(Registry, CreateManyEntitiesAtOnce) {
-    entt::registry<> registry;
-    entt::registry<>::entity_type entities[3];
+    entt::registry registry;
+    entt::entity entities[3];
 
     const auto entity = registry.create();
     registry.destroy(registry.create());
@@ -928,25 +926,25 @@ TEST(Registry, CreateManyEntitiesAtOnce) {
     ASSERT_TRUE(registry.valid(entities[1]));
     ASSERT_TRUE(registry.valid(entities[2]));
 
-    ASSERT_EQ(registry.entity(entities[0]), entt::registry<>::entity_type{0});
-    ASSERT_EQ(registry.version(entities[0]), entt::registry<>::version_type{2});
+    ASSERT_EQ(registry.entity(entities[0]), entt::entity{0});
+    ASSERT_EQ(registry.version(entities[0]), entt::registry::version_type{2});
 
-    ASSERT_EQ(registry.entity(entities[1]), entt::registry<>::entity_type{1});
-    ASSERT_EQ(registry.version(entities[1]), entt::registry<>::version_type{1});
+    ASSERT_EQ(registry.entity(entities[1]), entt::entity{1});
+    ASSERT_EQ(registry.version(entities[1]), entt::registry::version_type{1});
 
-    ASSERT_EQ(registry.entity(entities[2]), entt::registry<>::entity_type{2});
-    ASSERT_EQ(registry.version(entities[2]), entt::registry<>::version_type{0});
+    ASSERT_EQ(registry.entity(entities[2]), entt::entity{2});
+    ASSERT_EQ(registry.version(entities[2]), entt::registry::version_type{0});
 }
 
 TEST(Registry, CreateAnEntityWithComponents) {
-    entt::registry<> registry;
+    entt::registry registry;
     const auto &[entity, ivalue, cvalue] = registry.create<int, char>();
 
     ASSERT_FALSE(registry.empty<int>());
     ASSERT_FALSE(registry.empty<char>());
 
-    ASSERT_EQ(registry.size<int>(), entt::registry<>::size_type{1});
-    ASSERT_EQ(registry.size<int>(), entt::registry<>::size_type{1});
+    ASSERT_EQ(registry.size<int>(), entt::registry::size_type{1});
+    ASSERT_EQ(registry.size<int>(), entt::registry::size_type{1});
 
     ASSERT_TRUE((registry.has<int, char>(entity)));
 
@@ -958,8 +956,8 @@ TEST(Registry, CreateAnEntityWithComponents) {
 }
 
 TEST(Registry, CreateManyEntitiesWithComponentsAtOnce) {
-    entt::registry<> registry;
-    entt::registry<>::entity_type entities[3];
+    entt::registry registry;
+    entt::entity entities[3];
 
     const auto entity = registry.create();
     registry.destroy(registry.create());
@@ -971,21 +969,21 @@ TEST(Registry, CreateManyEntitiesWithComponentsAtOnce) {
     ASSERT_FALSE(registry.empty<int>());
     ASSERT_FALSE(registry.empty<char>());
 
-    ASSERT_EQ(registry.size<int>(), entt::registry<>::size_type{3});
-    ASSERT_EQ(registry.size<int>(), entt::registry<>::size_type{3});
+    ASSERT_EQ(registry.size<int>(), entt::registry::size_type{3});
+    ASSERT_EQ(registry.size<int>(), entt::registry::size_type{3});
 
     ASSERT_TRUE(registry.valid(entities[0]));
     ASSERT_TRUE(registry.valid(entities[1]));
     ASSERT_TRUE(registry.valid(entities[2]));
 
-    ASSERT_EQ(registry.entity(entities[0]), entt::registry<>::entity_type{0});
-    ASSERT_EQ(registry.version(entities[0]), entt::registry<>::version_type{2});
+    ASSERT_EQ(registry.entity(entities[0]), entt::entity{0});
+    ASSERT_EQ(registry.version(entities[0]), entt::registry::version_type{2});
 
-    ASSERT_EQ(registry.entity(entities[1]), entt::registry<>::entity_type{1});
-    ASSERT_EQ(registry.version(entities[1]), entt::registry<>::version_type{1});
+    ASSERT_EQ(registry.entity(entities[1]), entt::entity{1});
+    ASSERT_EQ(registry.version(entities[1]), entt::registry::version_type{1});
 
-    ASSERT_EQ(registry.entity(entities[2]), entt::registry<>::entity_type{2});
-    ASSERT_EQ(registry.version(entities[2]), entt::registry<>::version_type{0});
+    ASSERT_EQ(registry.entity(entities[2]), entt::entity{2});
+    ASSERT_EQ(registry.version(entities[2]), entt::registry::version_type{0});
 
     ASSERT_TRUE((registry.has<int, char>(entities[0])));
     ASSERT_TRUE((registry.has<int, char>(entities[1])));
@@ -1003,8 +1001,8 @@ TEST(Registry, CreateManyEntitiesWithComponentsAtOnce) {
 }
 
 TEST(Registry, CreateManyEntitiesWithComponentsAtOnceWithListener) {
-    entt::registry<> registry;
-    entt::registry<>::entity_type entities[3];
+    entt::registry registry;
+    entt::entity entities[3];
     listener listener;
 
     registry.construction<int>().connect<&listener::incr<int>>(&listener);
@@ -1014,8 +1012,8 @@ TEST(Registry, CreateManyEntitiesWithComponentsAtOnceWithListener) {
 }
 
 TEST(Registry, NonOwningGroupInterleaved) {
-    entt::registry<> registry;
-    typename entt::registry<>::entity_type entity = entt::null;
+    entt::registry registry;
+    typename entt::entity entity = entt::null;
 
     entity = registry.create();
     registry.assign<int>(entity);
@@ -1034,8 +1032,8 @@ TEST(Registry, NonOwningGroupInterleaved) {
 }
 
 TEST(Registry, FullOwningGroupInterleaved) {
-    entt::registry<> registry;
-    typename entt::registry<>::entity_type entity = entt::null;
+    entt::registry registry;
+    typename entt::entity entity = entt::null;
 
     entity = registry.create();
     registry.assign<int>(entity);
@@ -1054,8 +1052,8 @@ TEST(Registry, FullOwningGroupInterleaved) {
 }
 
 TEST(Registry, PartialOwningGroupInterleaved) {
-    entt::registry<> registry;
-    typename entt::registry<>::entity_type entity = entt::null;
+    entt::registry registry;
+    typename entt::entity entity = entt::null;
 
     entity = registry.create();
     registry.assign<int>(entity);
@@ -1074,7 +1072,7 @@ TEST(Registry, PartialOwningGroupInterleaved) {
 }
 
 TEST(Registry, NonOwningGroupSortInterleaved) {
-    entt::registry<> registry;
+    entt::registry registry;
     const auto group = registry.group<>(entt::get<int, char>);
 
     const auto e0 = registry.create();
@@ -1107,8 +1105,8 @@ TEST(Registry, NonOwningGroupSortInterleaved) {
 }
 
 TEST(Registry, Clone) {
-    entt::registry<> registry;
-    entt::registry<> other;
+    entt::registry registry;
+    entt::registry other;
 
     registry.destroy(registry.create());
 
@@ -1195,7 +1193,7 @@ TEST(Registry, Clone) {
 }
 
 TEST(Registry, GetOrAssign) {
-    entt::registry<> registry;
+    entt::registry registry;
     const auto entity = registry.create();
     const auto value = registry.get_or_assign<int>(entity, 3);
     ASSERT_TRUE(registry.has<int>(entity));
@@ -1204,7 +1202,7 @@ TEST(Registry, GetOrAssign) {
 }
 
 TEST(Registry, Constness) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     ASSERT_TRUE((std::is_same_v<decltype(registry.get<int>({})), int &>));
     ASSERT_TRUE((std::is_same_v<decltype(registry.get<int, char>({})), std::tuple<int &, char &>>));

+ 23 - 29
test/entt/entity/snapshot.cpp

@@ -49,12 +49,12 @@ struct another_component {
 };
 
 struct what_a_component {
-    entt::registry<>::entity_type bar;
-    std::vector<entt::registry<>::entity_type> quux;
+    entt::entity bar;
+    std::vector<entt::entity> quux;
 };
 
 TEST(Snapshot, Dump) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     const auto e0 = registry.create();
     registry.assign<int>(e0, 42);
@@ -73,7 +73,7 @@ TEST(Snapshot, Dump) {
     auto v1 = registry.current(e1);
 
     using storage_type = std::tuple<
-        std::queue<entt::registry<>::entity_type>,
+        std::queue<entt::entity>,
         std::queue<int>,
         std::queue<char>,
         std::queue<double>,
@@ -122,7 +122,7 @@ TEST(Snapshot, Dump) {
 }
 
 TEST(Snapshot, Partial) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     const auto e0 = registry.create();
     registry.assign<int>(e0, 42);
@@ -141,7 +141,7 @@ TEST(Snapshot, Partial) {
     auto v1 = registry.current(e1);
 
     using storage_type = std::tuple<
-        std::queue<entt::registry<>::entity_type>,
+        std::queue<entt::entity>,
         std::queue<int>,
         std::queue<char>,
         std::queue<double>
@@ -203,7 +203,7 @@ TEST(Snapshot, Partial) {
 }
 
 TEST(Snapshot, Iterator) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     for(auto i = 0; i < 50; ++i) {
         const auto entity = registry.create();
@@ -215,7 +215,7 @@ TEST(Snapshot, Iterator) {
     }
 
     using storage_type = std::tuple<
-        std::queue<entt::registry<>::entity_type>,
+        std::queue<entt::entity>,
         std::queue<another_component>
     >;
 
@@ -238,18 +238,16 @@ TEST(Snapshot, Iterator) {
 }
 
 TEST(Snapshot, Continuous) {
-    using entity_type = entt::registry<>::entity_type;
+    entt::registry src;
+    entt::registry dst;
 
-    entt::registry<> src;
-    entt::registry<> dst;
+    entt::continuous_loader loader{dst};
 
-    entt::continuous_loader<entity_type> loader{dst};
-
-    std::vector<entity_type> entities;
-    entity_type entity;
+    std::vector<entt::entity> entities;
+    entt::entity entity;
 
     using storage_type = std::tuple<
-        std::queue<entity_type>,
+        std::queue<entt::entity>,
         std::queue<a_component>,
         std::queue<another_component>,
         std::queue<what_a_component>,
@@ -429,15 +427,13 @@ TEST(Snapshot, Continuous) {
 }
 
 TEST(Snapshot, MoreOnShrink) {
-    using entity_type = entt::registry<>::entity_type;
-
-    entt::registry<> src;
-    entt::registry<> dst;
+    entt::registry src;
+    entt::registry dst;
 
-    entt::continuous_loader<entity_type> loader{dst};
+    entt::continuous_loader loader{dst};
 
     using storage_type = std::tuple<
-        std::queue<entity_type>,
+        std::queue<entt::entity>,
         std::queue<a_component>
     >;
 
@@ -457,15 +453,13 @@ TEST(Snapshot, MoreOnShrink) {
 }
 
 TEST(Snapshot, SyncDataMembers) {
-    using entity_type = entt::registry<>::entity_type;
-
-    entt::registry<> src;
-    entt::registry<> dst;
+    entt::registry src;
+    entt::registry dst;
 
-    entt::continuous_loader<entity_type> loader{dst};
+    entt::continuous_loader loader{dst};
 
     using storage_type = std::tuple<
-        std::queue<entity_type>,
+        std::queue<entt::entity>,
         std::queue<what_a_component>
     >;
 
@@ -493,7 +487,7 @@ TEST(Snapshot, SyncDataMembers) {
     ASSERT_TRUE(dst.has<what_a_component>(loader.map(parent)));
     ASSERT_TRUE(dst.has<what_a_component>(loader.map(child)));
 
-    ASSERT_EQ(dst.get<what_a_component>(loader.map(parent)).bar, static_cast<entity_type>(entt::null));
+    ASSERT_EQ(dst.get<what_a_component>(loader.map(parent)).bar, static_cast<entt::entity>(entt::null));
 
     const auto &component = dst.get<what_a_component>(loader.map(child));
 

+ 25 - 25
test/entt/entity/view.cpp

@@ -6,7 +6,7 @@
 #include <entt/entity/view.hpp>
 
 TEST(SingleComponentView, Functionalities) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto view = registry.view<char>();
     auto cview = std::as_const(registry).view<const char>();
 
@@ -51,7 +51,7 @@ TEST(SingleComponentView, Functionalities) {
 }
 
 TEST(SingleComponentView, ElementAccess) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto view = registry.view<int>();
     auto cview = std::as_const(registry).view<const int>();
 
@@ -68,7 +68,7 @@ TEST(SingleComponentView, ElementAccess) {
 }
 
 TEST(SingleComponentView, Contains) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     const auto e0 = registry.create();
     registry.assign<int>(e0);
@@ -85,7 +85,7 @@ TEST(SingleComponentView, Contains) {
 }
 
 TEST(SingleComponentView, Empty) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     const auto e0 = registry.create();
     registry.assign<char>(e0);
@@ -96,7 +96,7 @@ TEST(SingleComponentView, Empty) {
 
     auto view = registry.view<int>();
 
-    ASSERT_EQ(view.size(), entt::registry<>::size_type{0});
+    ASSERT_EQ(view.size(), entt::registry::size_type{0});
 
     for(auto entity: view) {
         (void)entity;
@@ -105,7 +105,7 @@ TEST(SingleComponentView, Empty) {
 }
 
 TEST(SingleComponentView, Each) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     registry.assign<int>(registry.create());
     registry.assign<int>(registry.create());
@@ -125,7 +125,7 @@ TEST(SingleComponentView, Each) {
 }
 
 TEST(SingleComponentView, ConstNonConstAndAllInBetween) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto view = registry.view<int>();
     auto cview = std::as_const(registry).view<const int>();
 
@@ -155,7 +155,7 @@ TEST(SingleComponentView, ConstNonConstAndAllInBetween) {
 }
 
 TEST(SingleComponentView, Find) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto view = registry.view<int>();
 
     const auto e0 = registry.create();
@@ -195,7 +195,7 @@ TEST(SingleComponentView, Find) {
 }
 
 TEST(MultipleComponentView, Functionalities) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto view = registry.view<int, char>();
     auto cview = std::as_const(registry).view<const int, const char>();
 
@@ -235,7 +235,7 @@ TEST(MultipleComponentView, Functionalities) {
 }
 
 TEST(MultipleComponentView, Iterator) {
-    entt::registry<> registry;
+    entt::registry registry;
     const auto entity = registry.create();
     registry.assign<int>(entity);
     registry.assign<char>(entity);
@@ -257,7 +257,7 @@ TEST(MultipleComponentView, Iterator) {
 }
 
 TEST(MultipleComponentView, Contains) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     const auto e0 = registry.create();
     registry.assign<int>(e0);
@@ -276,7 +276,7 @@ TEST(MultipleComponentView, Contains) {
 }
 
 TEST(MultipleComponentView, Empty) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     const auto e0 = registry.create();
     registry.assign<double>(e0);
@@ -296,7 +296,7 @@ TEST(MultipleComponentView, Empty) {
 }
 
 TEST(MultipleComponentView, Each) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     const auto e0 = registry.create();
     registry.assign<int>(e0);
@@ -322,7 +322,7 @@ TEST(MultipleComponentView, Each) {
 }
 
 TEST(MultipleComponentView, EachWithType) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     for(auto i = 0; i < 3; ++i) {
         const auto entity = registry.create();
@@ -348,7 +348,7 @@ TEST(MultipleComponentView, EachWithType) {
 }
 
 TEST(MultipleComponentView, EachWithHoles) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     const auto e0 = registry.create();
     const auto e1 = registry.create();
@@ -373,7 +373,7 @@ TEST(MultipleComponentView, EachWithHoles) {
 }
 
 TEST(MultipleComponentView, ConstNonConstAndAllInBetween) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto view = registry.view<int, const char>();
 
     ASSERT_EQ(view.size(), decltype(view.size()){0});
@@ -397,7 +397,7 @@ TEST(MultipleComponentView, ConstNonConstAndAllInBetween) {
 }
 
 TEST(MultipleComponentView, Find) {
-    entt::registry<> registry;
+    entt::registry registry;
     auto view = registry.view<int, const char>();
 
     const auto e0 = registry.create();
@@ -442,7 +442,7 @@ TEST(MultipleComponentView, Find) {
 }
 
 TEST(RuntimeView, Functionalities) {
-    entt::registry<> registry;
+    entt::registry registry;
     using component_type = typename decltype(registry)::component_type;
 
     // forces the creation of the pools
@@ -486,7 +486,7 @@ TEST(RuntimeView, Functionalities) {
 }
 
 TEST(RuntimeView, Iterator) {
-    entt::registry<> registry;
+    entt::registry registry;
     using component_type = typename decltype(registry)::component_type;
 
     const auto entity = registry.create();
@@ -511,7 +511,7 @@ TEST(RuntimeView, Iterator) {
 }
 
 TEST(RuntimeView, Contains) {
-    entt::registry<> registry;
+    entt::registry registry;
     using component_type = typename decltype(registry)::component_type;
 
     const auto e0 = registry.create();
@@ -532,7 +532,7 @@ TEST(RuntimeView, Contains) {
 }
 
 TEST(RuntimeView, Empty) {
-    entt::registry<> registry;
+    entt::registry registry;
     using component_type = typename decltype(registry)::component_type;
 
     const auto e0 = registry.create();
@@ -554,7 +554,7 @@ TEST(RuntimeView, Empty) {
 }
 
 TEST(RuntimeView, Each) {
-    entt::registry<> registry;
+    entt::registry registry;
     using component_type = typename decltype(registry)::component_type;
 
     const auto e0 = registry.create();
@@ -575,7 +575,7 @@ TEST(RuntimeView, Each) {
 }
 
 TEST(RuntimeView, EachWithHoles) {
-    entt::registry<> registry;
+    entt::registry registry;
     using component_type = typename decltype(registry)::component_type;
 
     const auto e0 = registry.create();
@@ -597,7 +597,7 @@ TEST(RuntimeView, EachWithHoles) {
 }
 
 TEST(RuntimeView, MissingPool) {
-    entt::registry<> registry;
+    entt::registry registry;
     using component_type = typename decltype(registry)::component_type;
 
     const auto e0 = registry.create();
@@ -624,7 +624,7 @@ TEST(RuntimeView, MissingPool) {
 }
 
 TEST(RuntimeView, EmptyRange) {
-    entt::registry<> registry;
+    entt::registry registry;
     using component_type = typename decltype(registry)::component_type;
 
     const auto e0 = registry.create();

+ 5 - 5
test/lib/a_module.cpp

@@ -18,8 +18,8 @@ ENTT_SHARED_TYPE(char)
 ENTT_SHARED_TYPE(double)
 ENTT_SHARED_TYPE(float)
 
-LIB_EXPORT typename entt::registry<>::component_type a_module_int_type() {
-    entt::registry<> registry;
+LIB_EXPORT typename entt::registry::component_type a_module_int_type() {
+    entt::registry registry;
 
     (void)registry.type<double>();
     (void)registry.type<float>();
@@ -27,8 +27,8 @@ LIB_EXPORT typename entt::registry<>::component_type a_module_int_type() {
     return registry.type<int>();
 }
 
-LIB_EXPORT typename entt::registry<>::component_type a_module_char_type() {
-    entt::registry<> registry;
+LIB_EXPORT typename entt::registry::component_type a_module_char_type() {
+    entt::registry registry;
 
     (void)registry.type<double>();
     (void)registry.type<float>();
@@ -36,7 +36,7 @@ LIB_EXPORT typename entt::registry<>::component_type a_module_char_type() {
     return registry.type<char>();
 }
 
-LIB_EXPORT void update_position(int delta, entt::registry<> &registry) {
+LIB_EXPORT void update_position(int delta, entt::registry &registry) {
     registry.view<position, velocity>().each([delta](auto &pos, auto &vel) {
         pos.x += delta * vel.dx;
         pos.y += delta * vel.dy;

+ 5 - 5
test/lib/another_module.cpp

@@ -18,8 +18,8 @@ ENTT_SHARED_TYPE(char)
 ENTT_SHARED_TYPE(double)
 ENTT_SHARED_TYPE(float)
 
-LIB_EXPORT typename entt::registry<>::component_type another_module_int_type() {
-    entt::registry<> registry;
+LIB_EXPORT typename entt::registry::component_type another_module_int_type() {
+    entt::registry registry;
 
     (void)registry.type<char>();
     (void)registry.type<const int>();
@@ -30,8 +30,8 @@ LIB_EXPORT typename entt::registry<>::component_type another_module_int_type() {
     return registry.type<int>();
 }
 
-LIB_EXPORT typename entt::registry<>::component_type another_module_char_type() {
-    entt::registry<> registry;
+LIB_EXPORT typename entt::registry::component_type another_module_char_type() {
+    entt::registry registry;
 
     (void)registry.type<int>();
     (void)registry.type<const char>();
@@ -42,7 +42,7 @@ LIB_EXPORT typename entt::registry<>::component_type another_module_char_type()
     return registry.type<char>();
 }
 
-LIB_EXPORT void assign_velocity(int vel, entt::registry<> &registry) {
+LIB_EXPORT void assign_velocity(int vel, entt::registry &registry) {
     for(auto entity: registry.view<position>()) {
         registry.assign<velocity>(entity, vel, vel);
     }

+ 10 - 10
test/lib/lib.cpp

@@ -4,13 +4,13 @@
 #include <gtest/gtest.h>
 #include "types.h"
 
-extern typename entt::registry<>::component_type a_module_int_type();
-extern typename entt::registry<>::component_type a_module_char_type();
-extern typename entt::registry<>::component_type another_module_int_type();
-extern typename entt::registry<>::component_type another_module_char_type();
+extern typename entt::registry::component_type a_module_int_type();
+extern typename entt::registry::component_type a_module_char_type();
+extern typename entt::registry::component_type another_module_int_type();
+extern typename entt::registry::component_type another_module_char_type();
 
-extern void update_position(int delta, entt::registry<> &);
-extern void assign_velocity(int, entt::registry<> &);
+extern void update_position(int delta, entt::registry &);
+extern void assign_velocity(int, entt::registry &);
 
 extern void trigger_an_event(int, entt::dispatcher &);
 extern void trigger_another_event(entt::dispatcher &);
@@ -26,7 +26,7 @@ ENTT_SHARED_TYPE(int)
 ENTT_SHARED_TYPE(char)
 
 TEST(Lib, Types) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     ASSERT_EQ(registry.type<int>(), registry.type<const int>());
     ASSERT_EQ(registry.type<char>(), registry.type<const char>());
@@ -43,7 +43,7 @@ TEST(Lib, Types) {
 }
 
 TEST(Lib, Registry) {
-    entt::registry<> registry;
+    entt::registry registry;
 
     for(auto i = 0; i < 3; ++i) {
         const auto entity = registry.create();
@@ -52,8 +52,8 @@ TEST(Lib, Registry) {
 
     assign_velocity(2, registry);
 
-    ASSERT_EQ(registry.size<position>(), entt::registry<>::size_type{3});
-    ASSERT_EQ(registry.size<velocity>(), entt::registry<>::size_type{3});
+    ASSERT_EQ(registry.size<position>(), entt::registry::size_type{3});
+    ASSERT_EQ(registry.size<velocity>(), entt::registry::size_type{3});
 
     update_position(1, registry);
 

+ 12 - 12
test/mod/mod.cpp

@@ -21,7 +21,7 @@ struct duktape_runtime {
 };
 
 template<typename Comp>
-duk_ret_t set(duk_context *ctx, entt::registry<> &registry) {
+duk_ret_t set(duk_context *ctx, entt::registry &registry) {
     const auto entity = duk_require_uint(ctx, 0);
 
     if constexpr(std::is_same_v<Comp, position>) {
@@ -48,7 +48,7 @@ duk_ret_t set(duk_context *ctx, entt::registry<> &registry) {
 }
 
 template<typename Comp>
-duk_ret_t unset(duk_context *ctx, entt::registry<> &registry) {
+duk_ret_t unset(duk_context *ctx, entt::registry &registry) {
     const auto entity = duk_require_uint(ctx, 0);
 
     if constexpr(std::is_same_v<Comp, duktape_runtime>) {
@@ -69,7 +69,7 @@ duk_ret_t unset(duk_context *ctx, entt::registry<> &registry) {
 }
 
 template<typename Comp>
-duk_ret_t has(duk_context *ctx, entt::registry<> &registry) {
+duk_ret_t has(duk_context *ctx, entt::registry &registry) {
     const auto entity = duk_require_uint(ctx, 0);
 
     if constexpr(std::is_same_v<Comp, duktape_runtime>) {
@@ -90,7 +90,7 @@ duk_ret_t has(duk_context *ctx, entt::registry<> &registry) {
 }
 
 template<typename Comp>
-duk_ret_t get(duk_context *ctx, entt::registry<> &registry) {
+duk_ret_t get(duk_context *ctx, entt::registry &registry) {
     [[maybe_unused]] const auto entity = duk_require_uint(ctx, 0);
 
     if constexpr(std::is_same_v<Comp, position>) {
@@ -123,10 +123,10 @@ duk_ret_t get(duk_context *ctx, entt::registry<> &registry) {
 
 class duktape_registry {
     // I'm pretty sure I won't have more than 99 components in the example
-    static constexpr entt::registry<>::component_type udef = 100;
+    static constexpr entt::registry::component_type udef = 100;
 
     struct func_map {
-        using func_type = duk_ret_t(*)(duk_context *, entt::registry<> &);
+        using func_type = duk_ret_t(*)(duk_context *, entt::registry &);
 
         func_type set;
         func_type unset;
@@ -172,7 +172,7 @@ class duktape_registry {
     }
 
 public:
-    duktape_registry(entt::registry<> &registry)
+    duktape_registry(entt::registry &registry)
         : registry{registry}
     {
         reg<position, renderable, duktape_runtime>();
@@ -213,8 +213,8 @@ public:
 
         duk_push_array(ctx);
 
-        std::vector<typename entt::registry<>::component_type> components;
-        std::vector<typename entt::registry<>::component_type> runtime;
+        std::vector<typename entt::registry::component_type> components;
+        std::vector<typename entt::registry::component_type> runtime;
 
         for(duk_idx_t arg = 0; arg < nargs; arg++) {
             auto type = duk_require_uint(ctx, arg);
@@ -254,7 +254,7 @@ public:
 
 private:
     std::map<duk_uint_t, func_map> func;
-    entt::registry<> &registry;
+    entt::registry &registry;
 };
 
 const duk_function_list_entry js_duktape_registry_methods[] = {
@@ -268,7 +268,7 @@ const duk_function_list_entry js_duktape_registry_methods[] = {
     { nullptr, nullptr, 0 }
 };
 
-void export_types(duk_context *ctx, entt::registry<> &registry) {
+void export_types(duk_context *ctx, entt::registry &registry) {
     auto export_type = [](auto *ctx, auto &registry, auto idx, auto type, const auto *name) {
         duk_push_string(ctx, name);
         duk_push_uint(ctx, registry.template type<typename decltype(type)::type>());
@@ -295,7 +295,7 @@ void export_duktape_registry(duk_context *ctx, duktape_registry &dreg) {
 }
 
 TEST(Mod, Duktape) {
-    entt::registry<> registry;
+    entt::registry registry;
     duktape_registry dreg{registry};
     duk_context *ctx = duk_create_heap_default();
 

+ 1 - 0
test/odr.cpp

@@ -1 +1,2 @@
 #include <entt/entt.hpp>
+#include <entt/fwd.hpp>

+ 7 - 7
test/snapshot/snapshot.cpp

@@ -15,7 +15,7 @@ struct timer {
 };
 
 struct relationship {
-    entt::registry<>::entity_type parent;
+    entt::entity parent;
 };
 
 template<typename Archive>
@@ -36,8 +36,8 @@ void serialize(Archive &archive, relationship &relationship) {
 TEST(Snapshot, Full) {
     std::stringstream storage;
 
-    entt::registry<> source;
-    entt::registry<> destination;
+    entt::registry source;
+    entt::registry destination;
 
     auto e0 = source.create();
     source.assign<position>(e0, 16.f, 16.f);
@@ -91,10 +91,10 @@ TEST(Snapshot, Full) {
 TEST(Snapshot, Continuous) {
     std::stringstream storage;
 
-    entt::registry<> source;
-    entt::registry<> destination;
+    entt::registry source;
+    entt::registry destination;
 
-    std::vector<entt::registry<>::entity_type> entities;
+    std::vector<entt::entity> entities;
     for(auto i = 0; i < 10; ++i) {
         entities.push_back(source.create());
     }
@@ -126,7 +126,7 @@ TEST(Snapshot, Continuous) {
     }
 
     cereal::JSONInputArchive input{storage};
-    entt::continuous_loader<entt::registry<>::entity_type> loader{destination};
+    entt::continuous_loader loader{destination};
     loader.entities(input)
             .component<position, relationship>(input, &relationship::parent)
             .component<timer>(input);