diff --git a/include/array_view.h b/include/array_view.h index 006f18c..d14a548 100644 --- a/include/array_view.h +++ b/include/array_view.h @@ -75,7 +75,7 @@ namespace details class coordinate_facade { static_assert(std::is_integral::value - && sizeof(ValueType) <= sizeof(size_t), "ValueType must be unsigned integral type!"); + && std::is_unsigned::value, "ValueType must be unsigned integral type!"); static_assert(Rank > 0, "Rank must be greater than 0!"); template @@ -771,7 +771,7 @@ class static_bounds { using MyRanges = details::BoundsRanges ; static_assert(std::is_integral::value - && details::SizeTypeTraits::max_value <= SIZE_MAX, "SizeType must be an integral type and its numeric limits must be smaller than SIZE_MAX"); + && details::SizeTypeTraits::max_value <= (std::numeric_limits::max)(), "SizeType must be an integral type and its numeric limits must be smaller than max size_t."); MyRanges m_ranges; _CONSTEXPR static_bounds(const MyRanges & range) : m_ranges(range) { } diff --git a/tests/array_view_tests.cpp b/tests/array_view_tests.cpp index ba251e8..8a4376c 100644 --- a/tests/array_view_tests.cpp +++ b/tests/array_view_tests.cpp @@ -1305,7 +1305,7 @@ SUITE(array_view_tests) TEST(custmized_array_view_size) { double (*arr)[3][4] = new double[100][3][4]; - array_view, dynamic_range, 3, 4> av1(arr, (char)10); + array_view, dynamic_range, 3, 4> av1(arr, (char)10); struct EffectiveStructure {