Michele Caini 1 год назад
Родитель
Сommit
affbc668df
2 измененных файлов с 4 добавлено и 0 удалено
  1. 2 0
      test/entt/entity/storage.cpp
  2. 2 0
      test/entt/entity/storage_no_instance.cpp

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

@@ -68,6 +68,8 @@ struct entt::component_traits<std::unordered_set<char>> {
 
 template<typename Type>
 struct Storage: testing::Test {
+    static_assert(entt::component_traits<Type>::page_size != 0u, "Empty type not allowed");
+
     using type = Type;
 };
 

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

@@ -16,6 +16,8 @@
 
 template<typename Type>
 struct StorageNoInstance: testing::Test {
+    static_assert(entt::component_traits<Type>::page_size == 0u, "Non-empty type not allowed");
+
     using type = Type;
 
     static auto emplace_instance(entt::storage<type> &pool, const entt::entity entt) {