diff --git a/src/Magnum/Math/Matrix.h b/src/Magnum/Math/Matrix.h index 53f749294..3b328e32d 100644 --- a/src/Magnum/Math/Matrix.h +++ b/src/Magnum/Math/Matrix.h @@ -83,7 +83,7 @@ template class Matrix: public RectangularMatrix constexpr /*implicit*/ Matrix(const Vector& first, const U&... next) noexcept: RectangularMatrix(first, next...) {} /** @brief Construct with one value for all elements */ - constexpr explicit Matrix(T value) noexcept: RectangularMatrix{typename Corrade::Containers::Implementation::GenerateSequence::Type{}, value} {} + constexpr explicit Matrix(T value) noexcept: RectangularMatrix{value} {} /** * @brief Construct from a matrix of a different type diff --git a/src/Magnum/Math/RectangularMatrix.h b/src/Magnum/Math/RectangularMatrix.h index 8a5671c5e..a7c56fd0d 100644 --- a/src/Magnum/Math/RectangularMatrix.h +++ b/src/Magnum/Math/RectangularMatrix.h @@ -497,21 +497,16 @@ template class RectangularMatrix { return *reinterpret_cast*>(data()); } - #ifndef DOXYGEN_GENERATING_OUTPUT - protected: - #else - private: - #endif - /* Implementation for RectangularMatrix::RectangularMatrix(T) and Matrix(T) */ - /* MSVC 2015 can't handle {} here */ - template constexpr explicit RectangularMatrix(Corrade::Containers::Implementation::Sequence, T value) noexcept: _data{Vector((static_cast(sequence), value))...} {} - private: /* These two needed to access _data to speed up debug builds, Matrix::ij() needs access to different Matrix sizes */ template friend class Matrix; template friend struct Implementation::MatrixDeterminant; + /* Implementation for RectangularMatrix::RectangularMatrix(T) and Matrix(T) */ + /* MSVC 2015 can't handle {} here */ + template constexpr explicit RectangularMatrix(Corrade::Containers::Implementation::Sequence, T value) noexcept: _data{Vector((static_cast(sequence), value))...} {} + /* Implementation for RectangularMatrix::fromDiagonal() and RectangularMatrix(IdentityInitT, T) */ template constexpr explicit RectangularMatrix(Corrade::Containers::Implementation::Sequence, const Vector& diagonal);