forked from microsoft/GSL
Cleanup include structure, constexpr and noexcept compiler workarounds.
* Nest "gsl" directory inside a new "include" directory. * Cleanup the _MSC_VER conditionals a bit; use constexpr on VS2017+. * Don't #define noexcept on non-Microsoft implementations. * Workaround VS2017 bug in multi_span. (Also implement == and != for static_bounds_dynamic_range_t because I'm an EoP semantic soundness snob.) Fixes #441.
This commit is contained in:
committed by
Neil MacIntosh
parent
96eaf274f8
commit
4e8f95b418
@@ -1148,7 +1148,7 @@ SUITE(multi_span_tests)
|
||||
auto width = 5, height = 20;
|
||||
|
||||
auto imgSize = width * height;
|
||||
auto image_ptr = new int[imgSize][3];
|
||||
auto image_ptr = new int[static_cast<std::size_t>(imgSize)][3];
|
||||
|
||||
// size check will be done
|
||||
auto image_view =
|
||||
@@ -1496,7 +1496,7 @@ SUITE(multi_span_tests)
|
||||
auto height = 4, width = 2;
|
||||
auto size = height * width;
|
||||
|
||||
auto arr = new int[size];
|
||||
auto arr = new int[static_cast<std::size_t>(size)];
|
||||
for (auto i = 0; i < size; ++i) {
|
||||
arr[i] = i;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user