diff --git a/headers/meta.hpp/meta_fwd.hpp b/headers/meta.hpp/meta_fwd.hpp index 96c6b49..f6497d9 100644 --- a/headers/meta.hpp/meta_fwd.hpp +++ b/headers/meta.hpp/meta_fwd.hpp @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -60,9 +61,12 @@ namespace meta_hpp std::is_void_v, "unexpected internal error"); protected: - static family_id::underlying_type last_id_; + static std::atomic last_id_; }; + template < typename Void > + std::atomic family_base::last_id_{}; + template < typename T > class type_family final : public family_base<> { public: @@ -82,9 +86,6 @@ namespace meta_hpp return self_id; } }; - - template < typename Void > - family_id::underlying_type family_base::last_id_{}; } template < typename T >