Ver Fonte

component: added in_place_delete_v and ignore_if_empty_v

Michele Caini há 4 anos atrás
pai
commit
987be01bd6
1 ficheiros alterados com 16 adições e 0 exclusões
  1. 16 0
      src/entt/entity/component.hpp

+ 16 - 0
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<class Type>
+inline constexpr bool in_place_delete_v = component_traits<Type>::in_place_delete::value;
+
+
+/**
+ * @brief Helper variable template.
+ * @tparam Type Type of component.
+ */
+template<class Type>
+inline constexpr bool ignore_if_empty_v = component_traits<Type>::ignore_if_empty::value;
+
+
 }