Skip to content

Commit

Permalink
fix sign-conversion warnings
Browse files Browse the repository at this point in the history
These appeared when we started using it at work, want to upstream
the fix
  • Loading branch information
cbeck88 committed Aug 7, 2018
1 parent 7c59536 commit 6378755
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/strict_variant/variant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class variant {
// Implementation note:
// `detail::true_` here indicates that the visit is internal and we should
// NOT pierce `recursive_wrapper`.
return detail::visitor_dispatch<detail::true_, 1 + sizeof...(Types)>{}(m_which, m_storage,
return detail::visitor_dispatch<detail::true_, 1 + sizeof...(Types)>{}(static_cast<unsigned>(m_which), m_storage,
visitor);
}

Expand Down Expand Up @@ -406,7 +406,7 @@ class variant {
using dispatcher_t = detail::visitor_dispatch<detail::false_, 1 + sizeof...(Types)>;

#define APPLY_VISITOR_IMPL_BODY \
dispatcher_t{}(visitable.which(), std::forward<Visitable>(visitable).m_storage, \
dispatcher_t{}(static_cast<unsigned>(visitable.which()), std::forward<Visitable>(visitable).m_storage, \
std::forward<Visitor>(visitor))

// Visitable is assumed to be, forwarding reference to this type.
Expand Down

0 comments on commit 6378755

Please sign in to comment.