Browse Source

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.
pull/442/head
Vladimír Vondruš 6 years ago
parent
commit
cda8c8fd09
  1. 2
      doc/changelog.dox
  2. 4
      src/Magnum/Math/PackingBatch.cpp

2
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

4
src/Magnum/Math/PackingBatch.cpp

@ -281,7 +281,7 @@ static_assert(sizeof(HalfBaseTable) + sizeof(HalfShiftTable) == 1536,
void unpackHalfInto(const Corrade::Containers::StridedArrayView2D<const UnsignedShort>& src, const Corrade::Containers::StridedArrayView2D<Float>& 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<const Unsigned
void packHalfInto(const Corrade::Containers::StridedArrayView2D<const Float>& src, const Corrade::Containers::StridedArrayView2D<UnsignedShort>& 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 */

Loading…
Cancel
Save