table: refine prototype
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
namespace entt {
|
||||
|
||||
struct basic_table {
|
||||
template<typename... Type, typename Allocator>
|
||||
struct basic_table<type_list<Type...>, Allocator> {
|
||||
};
|
||||
|
||||
} // namespace entt
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
#include <entt/entity/table.hpp>
|
||||
|
||||
TEST(Table, Placeholder) {
|
||||
entt::basic_table table{};
|
||||
entt::table<int, char> table{};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user