Skip to content

Commit

Permalink
Fix signed/unsigned comparison warning on gcc-7
Browse files Browse the repository at this point in the history
  • Loading branch information
patrikhuber authored and fiesh committed Mar 23, 2018
1 parent c3ff0f6 commit 08036cb
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 @@ -95,7 +95,7 @@ namespace cereal

std::int32_t index;
ar( CEREAL_NVP_("index", index) );
if(index >= std::variant_size_v<variant_t>)
if(index >= static_cast<std::int32_t>(std::variant_size_v<variant_t>))
throw Exception("Invalid 'index' selector when deserializing std::variant");

variant_detail::load_variant<0, variant_t, VariantTypes...>(ar, index, variant);
Expand Down

0 comments on commit 08036cb

Please sign in to comment.