diff --git a/src/Math/Matrix.h b/src/Math/Matrix.h index 70363d9ab..8a86bc8cd 100644 --- a/src/Math/Matrix.h +++ b/src/Math/Matrix.h @@ -29,11 +29,12 @@ namespace Implementation { template struct Sequence {}; - template struct GenerateSequence: - GenerateSequence {}; + /* E.g. GenerateSequence<3>::Type is Sequence<0, 1, 2> */ + template struct GenerateSequence: + GenerateSequence {}; - template struct GenerateSequence<0, S...> { - typedef Sequence Type; + template struct GenerateSequence<0, sequence...> { + typedef Sequence Type; }; } #endif diff --git a/src/Math/Matrix3.h b/src/Math/Matrix3.h index fca31ae8c..1ccf21d01 100644 --- a/src/Math/Matrix3.h +++ b/src/Math/Matrix3.h @@ -50,7 +50,7 @@ template class Matrix3: public Matrix { 0.0f, 0.0f, identity ? 1.0f : 0.0f } {} - /** @copydoc Matrix::Matrix(T, U&&...) */ + /** @copydoc Matrix::Matrix(T, U...) */ #ifndef DOXYGEN_GENERATING_OUTPUT template inline constexpr Matrix3(T first, U... next): Matrix(first, next...) {} #else diff --git a/src/Math/Matrix4.h b/src/Math/Matrix4.h index f86e0895d..88e4012ba 100644 --- a/src/Math/Matrix4.h +++ b/src/Math/Matrix4.h @@ -119,11 +119,11 @@ template class Matrix4: public Matrix { 0.0f, 0.0f, 0.0f, identity ? 1.0f : 0.0f } {} - /** @copydoc Matrix::Matrix(T, U&&...) */ + /** @copydoc Matrix::Matrix(T, U...) */ #ifndef DOXYGEN_GENERATING_OUTPUT template inline constexpr Matrix4(T first, U... next): Matrix(first, next...) {} #else - template inline constexpr Matrix4(T first, U&&... next) {} + template inline constexpr Matrix4(T first, U... next) {} #endif /** @copydoc Matrix::Matrix(const Matrix&) */ diff --git a/src/Math/Vector.h b/src/Math/Vector.h index addf06f59..81b59d283 100644 --- a/src/Math/Vector.h +++ b/src/Math/Vector.h @@ -87,6 +87,7 @@ template class Vector { * @param value Value for all fields */ inline explicit Vector(T value) { + /** @todo constexprize */ for(size_t i = 0; i != size; ++i) _data[i] = value; } diff --git a/src/Math/Vector2.h b/src/Math/Vector2.h index e30f4b307..1c1ef9d5a 100644 --- a/src/Math/Vector2.h +++ b/src/Math/Vector2.h @@ -37,6 +37,7 @@ template class Vector2: public Vector { } /** @copydoc Vector::Vector(T) */ + /** @todo Use original constructor when it is constexpr */ inline constexpr explicit Vector2(T value = T()): Vector(value, value) {} /** @copydoc Vector::Vector(const Vector&) */ diff --git a/src/Math/Vector3.h b/src/Math/Vector3.h index 00427cd17..8e97269f7 100644 --- a/src/Math/Vector3.h +++ b/src/Math/Vector3.h @@ -53,6 +53,7 @@ template class Vector3: public Vector { } /** @copydoc Vector::Vector(T) */ + /** @todo Use original constructor when it is constexpr */ inline constexpr explicit Vector3(T value = T()): Vector(value, value, value) {} /** @copydoc Vector::Vector(const Vector&) */ diff --git a/src/Math/Vector4.h b/src/Math/Vector4.h index ee02dbf2e..d95cc6e05 100644 --- a/src/Math/Vector4.h +++ b/src/Math/Vector4.h @@ -44,6 +44,7 @@ template class Vector4: public Vector { inline constexpr Vector4(): Vector(T(0), T(0), T(0), T(1)) {} /** @copydoc Vector::Vector(T) */ + /** @todo Use original constructor when it is constexpr */ inline constexpr explicit Vector4(T value): Vector(value, value, value, value) {} /** @copydoc Vector::Vector(const Vector&) */