component: automatic traits deduction
This commit is contained in:
@@ -13,16 +13,14 @@ struct position {
|
||||
};
|
||||
|
||||
struct velocity: position {};
|
||||
struct stable_position: position {};
|
||||
|
||||
struct stable_position: position {
|
||||
static constexpr auto in_place_delete = true;
|
||||
};
|
||||
|
||||
template<auto>
|
||||
struct comp { int x; };
|
||||
|
||||
template<>
|
||||
struct entt::component_traits<stable_position>: basic_component_traits {
|
||||
static constexpr auto in_place_delete = true;
|
||||
};
|
||||
|
||||
struct timer final {
|
||||
timer()
|
||||
: start{std::chrono::system_clock::now()} {}
|
||||
|
||||
Reference in New Issue
Block a user