From cda8c8fd090ea09409a5d5011809663fd9b00010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 4 May 2020 15:10:56 +0200 Subject: [PATCH] Math: MSVC 2017 apparently dies on this. But only in the vcpkg package and only with 19.16.27034 (not 27035), so probably some combination of /permissive- and a compiler bug is to blame. The template keyword was unnecessary in any case, it probably got copied from elsewhere by accident. --- doc/changelog.dox | 2 ++ src/Magnum/Math/PackingBatch.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/changelog.dox b/doc/changelog.dox index c1fe68d91..def12fd4b 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -466,6 +466,8 @@ See also: issues (see [mosra/magnum#421](https://github.com/mosra/magnum/issues/421)) - The library again compiles and tests cleanly with @ref CORRADE_NO_ASSERT enabled, and this setup is verified on the CI to avoid further regressions +- Worked around a regression in MSVC 2017 causing a compiler crash (see + [mosra/magnum#440](https://github.com/mosra/magnum/issues/440)) @subsection changelog-latest-bugfixes Bug fixes diff --git a/src/Magnum/Math/PackingBatch.cpp b/src/Magnum/Math/PackingBatch.cpp index 3dc9e7ae4..c0f8b7a7a 100644 --- a/src/Magnum/Math/PackingBatch.cpp +++ b/src/Magnum/Math/PackingBatch.cpp @@ -281,7 +281,7 @@ static_assert(sizeof(HalfBaseTable) + sizeof(HalfShiftTable) == 1536, void unpackHalfInto(const Corrade::Containers::StridedArrayView2D& src, const Corrade::Containers::StridedArrayView2D& dst) { CORRADE_ASSERT(src.size() == dst.size(), "Math::unpackHalfInto(): wrong destination size, got" << dst.size() << "but expected" << src.size(), ); - CORRADE_ASSERT(src.template isContiguous<1>() && dst.isContiguous<1>(), + CORRADE_ASSERT(src.isContiguous<1>() && dst.isContiguous<1>(), "Math::unpackHalfInto(): second view dimension is not contiguous", ); /* Caching values to avoid inline function calls in debug builds */ @@ -306,7 +306,7 @@ void unpackHalfInto(const Corrade::Containers::StridedArrayView2D& src, const Corrade::Containers::StridedArrayView2D& dst) { CORRADE_ASSERT(src.size() == dst.size(), "Math::packHalfInto(): wrong destination size, got" << dst.size() << "but expected" << src.size(), ); - CORRADE_ASSERT(src.template isContiguous<1>() && dst.isContiguous<1>(), + CORRADE_ASSERT(src.isContiguous<1>() && dst.isContiguous<1>(), "Math::packHalfInto(): second view dimension is not contiguous", ); /* Caching values to avoid inline function calls in debug builds */