diff --git a/include/fc/static_variant.hpp b/include/fc/static_variant.hpp index 4f13f5b..4bfca85 100644 --- a/include/fc/static_variant.hpp +++ b/include/fc/static_variant.hpp @@ -181,7 +181,8 @@ class static_variant { static_assert(impl::type_info::no_reference_types, "Reference types are not permitted in static_variant."); static_assert(impl::type_info::no_duplicates, "static_variant type arguments contain duplicate types."); - size_t _tag; + using tag_type = int64_t; + tag_type _tag; char storage[impl::type_info::size]; template @@ -326,14 +327,14 @@ public: } static int count() { return impl::type_info::count; } - void set_which( size_t w ) { + void set_which( tag_type w ) { FC_ASSERT( w < count() ); this->~static_variant(); _tag = w; impl::storage_ops<0, Types...>::con(_tag, storage); } - size_t which() const {return _tag;} + tag_type which() const {return _tag;} }; template