|
|
|
|
@ -38,7 +38,10 @@ namespace Magnum { namespace Math {
|
|
|
|
|
namespace Implementation { |
|
|
|
|
|
|
|
|
|
template<> struct RectangularMatrixConverter<2, 3, Float, Mat2x3> { |
|
|
|
|
constexpr static RectangularMatrix<2, 3, Float> from(const Mat2x3& other) { |
|
|
|
|
#if !defined(__GNUC__) || defined(__clang__) |
|
|
|
|
constexpr /* See the convert() test case */ |
|
|
|
|
#endif |
|
|
|
|
static RectangularMatrix<2, 3, Float> from(const Mat2x3& other) { |
|
|
|
|
return RectangularMatrix<2, 3, Float>( |
|
|
|
|
Vector<3, Float>(other.a[0], other.a[1], other.a[2]), |
|
|
|
|
Vector<3, Float>(other.a[3], other.a[4], other.a[5])); |
|
|
|
|
@ -211,7 +214,13 @@ void RectangularMatrixTest::convert() {
|
|
|
|
|
constexpr Matrix2x3 b(Vector3(1.5f, 2.0f, -3.5f), |
|
|
|
|
Vector3(2.0f, -3.1f, 0.4f)); |
|
|
|
|
|
|
|
|
|
constexpr Matrix2x3 c{a}; |
|
|
|
|
/* GCC 5.1 fills the result with zeros instead of properly calling
|
|
|
|
|
delegated copy constructor if using constexpr. Reported here: |
|
|
|
|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66450 */
|
|
|
|
|
#if !defined(__GNUC__) || defined(__clang__) |
|
|
|
|
constexpr |
|
|
|
|
#endif |
|
|
|
|
Matrix2x3 c{a}; |
|
|
|
|
CORRADE_COMPARE(c, b); |
|
|
|
|
|
|
|
|
|
constexpr Mat2x3 d(b); |
|
|
|
|
|