table: refine prototype

This commit is contained in:
Michele Caini
2024-04-15 09:42:11 +02:00
parent 57d3c53014
commit b69390f283
3 changed files with 13 additions and 2 deletions

View File

@@ -28,6 +28,9 @@ class basic_sparse_set;
template<typename Type, typename = entity, typename = std::allocator<Type>, typename = void>
class basic_storage;
template<typename, typename = std::allocator<void>>
class basic_table;
template<typename, typename>
class basic_sigh_mixin;
@@ -71,6 +74,13 @@ using sparse_set = basic_sparse_set<>;
template<typename Type>
using storage = basic_storage<Type>;
/**
* @brief Alias declaration for the most common use case.
* @tparam Type Element types.
*/
template<typename... Type>
using table = basic_table<type_list<Type...>>;
/**
* @brief Alias declaration for the most common use case.
* @tparam Type Underlying storage type.

View File

@@ -5,7 +5,8 @@
namespace entt {
struct basic_table {
template<typename... Type, typename Allocator>
struct basic_table<type_list<Type...>, Allocator> {
};
} // namespace entt

View File

@@ -2,5 +2,5 @@
#include <entt/entity/table.hpp>
TEST(Table, Placeholder) {
entt::basic_table table{};
entt::table<int, char> table{};
}