From 987be01bd6f391b3c49d113bf1592dcd4dca5da5 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Sat, 3 Jul 2021 00:23:09 +0200 Subject: [PATCH] component: added in_place_delete_v and ignore_if_empty_v --- src/entt/entity/component.hpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/entt/entity/component.hpp b/src/entt/entity/component.hpp index 67aa54a86..0839a9178 100644 --- a/src/entt/entity/component.hpp +++ b/src/entt/entity/component.hpp @@ -28,6 +28,22 @@ struct component_traits: basic_component_traits { }; +/** + * @brief Helper variable template. + * @tparam Type Type of component. + */ +template +inline constexpr bool in_place_delete_v = component_traits::in_place_delete::value; + + +/** + * @brief Helper variable template. + * @tparam Type Type of component. + */ +template +inline constexpr bool ignore_if_empty_v = component_traits::ignore_if_empty::value; + + }