mirror of
https://github.com/BlackMATov/ecs.hpp.git
synced 2025-12-16 14:11:14 +07:00
fix msvc compilation
This commit is contained in:
14
ecs.hpp
14
ecs.hpp
@@ -50,13 +50,17 @@ namespace ecs_hpp
|
|||||||
{
|
{
|
||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
template < typename Tag = void >
|
template < typename Void = void >
|
||||||
struct type_family_base {
|
class type_family_base {
|
||||||
|
static_assert(
|
||||||
|
std::is_void<Void>::value,
|
||||||
|
"unexpected internal error");
|
||||||
|
protected:
|
||||||
static family_id last_id_;
|
static family_id last_id_;
|
||||||
};
|
};
|
||||||
|
|
||||||
template < typename T >
|
template < typename T >
|
||||||
class type_family : private type_family_base<> {
|
class type_family : public type_family_base<> {
|
||||||
public:
|
public:
|
||||||
static family_id id() noexcept {
|
static family_id id() noexcept {
|
||||||
static family_id self_id = ++last_id_;
|
static family_id self_id = ++last_id_;
|
||||||
@@ -65,8 +69,8 @@ namespace ecs_hpp
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template < typename Tag >
|
template < typename Void >
|
||||||
family_id type_family_base<Tag>::last_id_{0u};
|
family_id type_family_base<Void>::last_id_ = 0u;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user