Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make static_variant::tag_type public #112

Merged
merged 1 commit into from
Mar 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion include/fc/static_variant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,16 @@ static const fc::array<typename Visitor::result_type(*)(Visitor&,Data),L>

template<typename... Types>
class static_variant {
public:
using tag_type = int64_t;

protected:
static_assert(impl::type_info<Types...>::no_reference_types, "Reference types are not permitted in static_variant.");
static_assert(impl::type_info<Types...>::no_duplicates, "static_variant type arguments contain duplicate types.");

template<typename X>
using type_in_typelist = typename std::enable_if<impl::position<X, Types...>::pos != -1, X>::type; // type is in typelist of static_variant.

using tag_type = int64_t;
tag_type _tag;
impl::dynamic_storage storage;

Expand Down