diff --git a/include/mapbox/variant.hpp b/include/mapbox/variant.hpp index 06a46ab..5b128dc 100644 --- a/include/mapbox/variant.hpp +++ b/include/mapbox/variant.hpp @@ -520,7 +520,7 @@ class variant static_assert(sizeof...(Types) > 0, "Template parameter type list of variant can not be empty."); static_assert(!detail::disjunction...>::value, "Variant can not hold reference types. Maybe use std::reference_wrapper?"); static_assert(!detail::disjunction...>::value, "Variant can not hold array types."); - static_assert(sizeof...(Types) < std::numeric_limits::max(), "Internal index type must be able to accommodate all alternatives."); + static_assert(sizeof...(Types) < (std::numeric_limits::max)(), "Internal index type must be able to accommodate all alternatives."); private: static const std::size_t data_size = detail::static_max::value; static const std::size_t data_align = detail::static_max::value;