@@ -43,7 +43,7 @@ export namespace stormkit::entities {
4343
4444 namespace meta {
4545 template<typename T>
46- concept IsComponentType = core::meta::Is<Component, T > and requires(T&& component) {
46+ concept IsComponentType = core::meta::Is<T, Component > and requires(T&& component) {
4747 T::TYPE;
4848 };
4949
@@ -305,7 +305,6 @@ namespace stormkit::entities {
305305 /////////////////////////////////////
306306 template<meta::IsComponentType T, typename... Args>
307307 auto EntityManager::add_component(Entity entity, Args&&... args) -> T& {
308- static_assert(std::is_base_of<Component, T>::value, "T must be a Component");
309308 static_assert(T::TYPE != Component::INVALID_TYPE, "T must have T::type defined");
310309
311310 EXPECTS(has_entity(entity));
@@ -326,7 +325,6 @@ namespace stormkit::entities {
326325 /////////////////////////////////////
327326 template<meta::IsComponentType T>
328327 auto EntityManager::destroy_component(Entity entity) -> void {
329- static_assert(std::is_base_of<Component, T>::value, "T must be a Component");
330328 static_assert(T::TYPE != Component::INVALID_TYPE, "T must have T::type defined");
331329
332330 EXPECTS(has_entity(entity));
@@ -343,7 +341,6 @@ namespace stormkit::entities {
343341 /////////////////////////////////////
344342 template<meta::IsComponentType T>
345343 auto EntityManager::has_component(Entity entity) const -> bool {
346- static_assert(std::is_base_of<Component, T>::value, "T must be a Component");
347344 static_assert(T::TYPE != Component::INVALID_TYPE, "T must have T::type defined");
348345
349346 return has_component(entity, T::TYPE);
0 commit comments