Skip to content

Commit

Permalink
Add explicit cast to silence warning
Browse files Browse the repository at this point in the history
  • Loading branch information
patrikhuber authored and fiesh committed Mar 23, 2018
1 parent cc400bd commit c3ff0f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/cereal/types/variant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ namespace cereal
template <class Archive, typename VariantType1, typename... VariantTypes> inline
void CEREAL_SAVE_FUNCTION_NAME( Archive & ar, std::variant<VariantType1, VariantTypes...> const & variant )
{
std::int32_t index = variant.index();
std::int32_t index = static_cast<std::int32_t>(variant.index());
ar( CEREAL_NVP_("index", index) );
variant_detail::variant_save_visitor<Archive> visitor(ar);
std::visit(visitor, variant);
Expand Down

0 comments on commit c3ff0f6

Please sign in to comment.