From 0b7831c1ad6ae86cb52fee383feb9dd00f1730ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 3 Jan 2020 21:27:09 +0100 Subject: [PATCH] doc: pile on more Doxygen workarounds. Sad! https://github.com/doxygen/doxygen/issues/7472 --- src/Magnum/Array.h | 57 +++++++++++++++++------- src/Magnum/GL/Mesh.h | 12 +++-- src/Magnum/GL/MeshView.h | 12 +++-- src/Magnum/Math/Bezier.h | 8 +++- src/Magnum/Math/BoolVector.h | 4 +- src/Magnum/Math/Complex.h | 12 +++-- src/Magnum/Math/CubicHermite.h | 16 +++++-- src/Magnum/Math/Dual.h | 12 +++-- src/Magnum/Math/DualComplex.h | 4 +- src/Magnum/Math/DualQuaternion.h | 4 +- src/Magnum/Math/Frustum.h | 4 +- src/Magnum/Math/Matrix3.h | 12 +++-- src/Magnum/Math/Matrix4.h | 16 +++++-- src/Magnum/Math/Quaternion.h | 12 +++-- src/Magnum/Math/Range.h | 68 +++++++++++++++++++++-------- src/Magnum/Math/RectangularMatrix.h | 8 +++- src/Magnum/Math/Vector.h | 8 +++- src/Magnum/Math/Vector2.h | 15 +++++-- src/Magnum/Math/Vector3.h | 28 +++++++++--- src/Magnum/Math/Vector4.h | 44 ++++++++++++++----- src/Magnum/Trade/ObjectData2D.h | 4 +- src/Magnum/Trade/ObjectData3D.h | 4 +- 22 files changed, 272 insertions(+), 92 deletions(-) diff --git a/src/Magnum/Array.h b/src/Magnum/Array.h index 8b625beea..52f9a7102 100644 --- a/src/Magnum/Array.h +++ b/src/Magnum/Array.h @@ -94,14 +94,18 @@ template class Array { /** @brief Value at given position */ T& operator[](UnsignedInt pos) { return _data[pos]; } - constexpr T operator[](UnsignedInt pos) const { return _data[pos]; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T operator[](UnsignedInt pos) const { return _data[pos]; } /** * @brief Raw data * @return One-dimensional array of `dimensions` length */ T* data() { return _data; } - constexpr const T* data() const { return _data; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr const T* data() const { return _data; } #ifndef DOXYGEN_GENERATING_OUTPUT protected: @@ -133,8 +137,11 @@ template class Array1D: public Array<1, T> { /** @brief Copy constructor */ constexpr Array1D(const Array<1, T>& other): Array<1, T>(other) {} - T& x() { return Array<1, T>::_data[0]; } /**< @brief X component */ - constexpr T x() const { return Array<1, T>::_data[0]; } /**< @overload */ + /** @brief X component */ + T& x() { return Array<1, T>::_data[0]; } + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T x() const { return Array<1, T>::_data[0]; } }; /** @@ -159,10 +166,17 @@ template class Array2D: public Array<2, T> { /** @brief Copy constructor */ constexpr Array2D(const Array<2, T>& other): Array<2, T>(other) {} - T& x() { return Array<2, T>::_data[0]; } /**< @brief X component */ - constexpr T x() const { return Array<2, T>::_data[0]; } /**< @overload */ - T& y() { return Array<2, T>::_data[1]; } /**< @brief Y component */ - constexpr T y() const { return Array<2, T>::_data[1]; } /**< @overload */ + /** @brief X component */ + T& x() { return Array<2, T>::_data[0]; } + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T x() const { return Array<2, T>::_data[0]; } + + /** @brief Y component */ + T& y() { return Array<2, T>::_data[1]; } + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T y() const { return Array<2, T>::_data[1]; } }; /** @@ -188,21 +202,34 @@ template class Array3D: public Array<3, T> { /** @brief Copy constructor */ constexpr Array3D(const Array<3, T>& other): Array<3, T>(other) {} - T& x() { return Array<3, T>::_data[0]; } /**< @brief X component */ - constexpr T x() const { return Array<3, T>::_data[0]; } /**< @overload */ - T& y() { return Array<3, T>::_data[1]; } /**< @brief Y component */ - constexpr T y() const { return Array<3, T>::_data[1]; } /**< @overload */ - T& z() { return Array<3, T>::_data[2]; } /**< @brief Z component */ - constexpr T z() const { return Array<3, T>::_data[2]; } /**< @overload */ + /** @brief X component */ + T& x() { return Array<3, T>::_data[0]; } + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T x() const { return Array<3, T>::_data[0]; } + + /** @brief Y component */ + T& y() { return Array<3, T>::_data[1]; } + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T y() const { return Array<3, T>::_data[1]; } + + /** @brief Z component */ + T& z() { return Array<3, T>::_data[2]; } + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T z() const { return Array<3, T>::_data[2]; } /** * @brief XY part of the array * @return First two components of the array */ Array2D& xy() { return reinterpret_cast&>(*this); } + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ constexpr Array2D xy() const { return {Array<3, T>::_data[0], Array<3, T>::_data[1]}; - } /**< @overload */ + } }; /** @debugoperator{Array} */ diff --git a/src/Magnum/GL/Mesh.h b/src/Magnum/GL/Mesh.h index 966849b95..7eae97fdf 100644 --- a/src/Magnum/GL/Mesh.h +++ b/src/Magnum/GL/Mesh.h @@ -890,9 +890,11 @@ class MAGNUM_GL_EXPORT Mesh: public AbstractObject { Mesh& setIndexBuffer(Buffer&& buffer, GLintptr offset, MeshIndexType type) { return setIndexBuffer(std::move(buffer), offset, type, 0, 0); } + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ Mesh& setIndexBuffer(Buffer&& buffer, GLintptr offset, Magnum::MeshIndexType type) { return setIndexBuffer(std::move(buffer), offset, meshIndexType(type), 0, 0); - } /**< @overload */ + } /** * @brief Draw the mesh @@ -940,9 +942,11 @@ class MAGNUM_GL_EXPORT Mesh: public AbstractObject { * available in OpenGL ES or WebGL. */ Mesh& draw(AbstractShaderProgram& shader); + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ Mesh& draw(AbstractShaderProgram&& shader) { return draw(shader); - } /**< @overload */ + } #ifndef MAGNUM_TARGET_GLES /** @@ -975,9 +979,11 @@ class MAGNUM_GL_EXPORT Mesh: public AbstractObject { * if @ref instanceCount() is more than `1`. */ Mesh& draw(AbstractShaderProgram& shader, TransformFeedback& xfb, UnsignedInt stream = 0); + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ Mesh& draw(AbstractShaderProgram&& shader, TransformFeedback& xfb, UnsignedInt stream = 0) { return draw(shader, xfb, stream); - } /**< @overload */ + } #endif private: diff --git a/src/Magnum/GL/MeshView.h b/src/Magnum/GL/MeshView.h index 4cf89d54d..9b3aad5a9 100644 --- a/src/Magnum/GL/MeshView.h +++ b/src/Magnum/GL/MeshView.h @@ -112,7 +112,9 @@ class MAGNUM_GL_EXPORT MeshView { /** @brief Original mesh */ Mesh& mesh() { return _original; } - const Mesh& mesh() const { return _original; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + const Mesh& mesh() const { return _original; } /** @brief Vertex/index count */ Int count() const { return _count; } @@ -257,9 +259,11 @@ class MAGNUM_GL_EXPORT MeshView { * available in OpenGL ES or WebGL. */ MeshView& draw(AbstractShaderProgram& shader); + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ MeshView& draw(AbstractShaderProgram&& shader) { return draw(shader); - } /**< @overload */ + } #ifndef MAGNUM_TARGET_GLES /** @@ -280,9 +284,11 @@ class MAGNUM_GL_EXPORT MeshView { * if @ref instanceCount() is more than `1`. */ MeshView& draw(AbstractShaderProgram& shader, TransformFeedback& xfb, UnsignedInt stream = 0); + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ MeshView& draw(AbstractShaderProgram&& shader, TransformFeedback& xfb, UnsignedInt stream = 0) { return draw(shader, xfb, stream); - } /**< @overload */ + } #endif private: diff --git a/src/Magnum/Math/Bezier.h b/src/Magnum/Math/Bezier.h index 7aa88df3c..4d622f249 100644 --- a/src/Magnum/Math/Bezier.h +++ b/src/Magnum/Math/Bezier.h @@ -142,7 +142,9 @@ template class Bezier { * @see @ref operator[]() */ Vector* data() { return _data; } - constexpr const Vector* data() const { return _data; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr const Vector* data() const { return _data; } /** @brief Equality comparison */ bool operator==(const Bezier& other) const { @@ -162,8 +164,10 @@ template class Bezier { * @p i should not be larger than @ref Order. */ Vector& operator[](std::size_t i) { return _data[i]; } + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ /* returns const& so [][] operations are also constexpr */ - constexpr const Vector& operator[](std::size_t i) const { return _data[i]; } /**< @overload */ + constexpr const Vector& operator[](std::size_t i) const { return _data[i]; } /** * @brief Interpolate the curve at given position diff --git a/src/Magnum/Math/BoolVector.h b/src/Magnum/Math/BoolVector.h index 152fe2e9e..677ba53bc 100644 --- a/src/Magnum/Math/BoolVector.h +++ b/src/Magnum/Math/BoolVector.h @@ -150,7 +150,9 @@ template class BoolVector { * @see @ref operator[](), @ref set() */ UnsignedByte* data() { return _data; } - constexpr const UnsignedByte* data() const { return _data; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr const UnsignedByte* data() const { return _data; } /** @brief Bit at given position */ constexpr bool operator[](std::size_t i) const { diff --git a/src/Magnum/Math/Complex.h b/src/Magnum/Math/Complex.h index 7b2ae415c..2927f2f80 100644 --- a/src/Magnum/Math/Complex.h +++ b/src/Magnum/Math/Complex.h @@ -188,7 +188,9 @@ template class Complex { * @see @ref real(), @ref imaginary() */ T* data() { return &_real; } - constexpr const T* data() const { return &_real; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr const T* data() const { return &_real; } /** @brief Equality comparison */ bool operator==(const Complex& other) const { @@ -219,7 +221,9 @@ template class Complex { * @see @ref data() */ T& real() { return _real; } - constexpr T real() const { return _real; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T real() const { return _real; } /** * @brief Imaginary part (@f$ a_i @f$) @@ -227,7 +231,9 @@ template class Complex { * @see @ref data() */ T& imaginary() { return _imaginary; } - constexpr T imaginary() const { return _imaginary; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T imaginary() const { return _imaginary; } /** * @brief Convert a complex number to vector diff --git a/src/Magnum/Math/CubicHermite.h b/src/Magnum/Math/CubicHermite.h index b76eadb4a..f78113d1e 100644 --- a/src/Magnum/Math/CubicHermite.h +++ b/src/Magnum/Math/CubicHermite.h @@ -151,7 +151,9 @@ template class CubicHermite { * @see @ref inTangent(), @ref point(), @ref outTangent() */ T* data() { return &_inTangent; } - constexpr const T* data() const { return &_inTangent; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr const T* data() const { return &_inTangent; } /** @brief Equality comparison */ bool operator==(const CubicHermite& other) const; @@ -163,18 +165,24 @@ template class CubicHermite { /** @brief In-tangent @f$ \boldsymbol{m} @f$ */ T& inTangent() { return _inTangent; } + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ /* returns const& so [] operations are also constexpr */ - constexpr const T& inTangent() const { return _inTangent; } /**< @overload */ + constexpr const T& inTangent() const { return _inTangent; } /** @brief Point @f$ \boldsymbol{p} @f$ */ T& point() { return _point; } + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ /* returns const& so [] operations are also constexpr */ - constexpr const T& point() const { return _point; } /**< @overload */ + constexpr const T& point() const { return _point; } /** @brief Out-tangent @f$ \boldsymbol{n} @f$ */ T& outTangent() { return _outTangent; } + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ /* returns const& so [] operations are also constexpr */ - constexpr const T& outTangent() const { return _outTangent; } /**< @overload */ + constexpr const T& outTangent() const { return _outTangent; } private: template friend class CubicHermite; diff --git a/src/Magnum/Math/Dual.h b/src/Magnum/Math/Dual.h index f95f6aabb..da85cc5ac 100644 --- a/src/Magnum/Math/Dual.h +++ b/src/Magnum/Math/Dual.h @@ -121,7 +121,9 @@ template class Dual { * @see @ref real(), @ref dual() */ T* data() { return &_real; } - constexpr const T* data() const { return &_real; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr const T* data() const { return &_real; } /** @brief Equality comparison */ bool operator==(const Dual& other) const { @@ -140,9 +142,11 @@ template class Dual { * @see @ref data() */ T& real() { return _real; } + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ /* Returning const so it's possible to call constexpr functions on the result. WTF, C++?! */ - constexpr const T real() const { return _real; } /**< @overload */ + constexpr const T real() const { return _real; } /** * @brief Dual part (@f$ a_\epsilon @f$) @@ -150,9 +154,11 @@ template class Dual { * @see @ref data() */ T& dual() { return _dual; } + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ /* Returning const so it's possible to call constexpr functions on the result. WTF, C++?! */ - constexpr const T dual() const { return _dual; } /**< @overload */ + constexpr const T dual() const { return _dual; } /** * @brief Add and assign dual number diff --git a/src/Magnum/Math/DualComplex.h b/src/Magnum/Math/DualComplex.h index 545cea56b..d15406039 100644 --- a/src/Magnum/Math/DualComplex.h +++ b/src/Magnum/Math/DualComplex.h @@ -171,7 +171,9 @@ template class DualComplex: public Dual> { * @see @ref real(), @ref dual() */ T* data() { return Dual>::data()->data(); } - constexpr const T* data() const { return Dual>::data()->data(); } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr const T* data() const { return Dual>::data()->data(); } /** * @brief Whether the dual complex number is normalized diff --git a/src/Magnum/Math/DualQuaternion.h b/src/Magnum/Math/DualQuaternion.h index fa0f765d2..49b9d891e 100644 --- a/src/Magnum/Math/DualQuaternion.h +++ b/src/Magnum/Math/DualQuaternion.h @@ -318,7 +318,9 @@ template class DualQuaternion: public Dual> { * @see @ref real(), @ref dual() */ T* data() { return Dual>::data()->data(); } - constexpr const T* data() const { return Dual>::data()->data(); } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr const T* data() const { return Dual>::data()->data(); } /** * @brief Whether the dual quaternion is normalized diff --git a/src/Magnum/Math/Frustum.h b/src/Magnum/Math/Frustum.h index a21990ecb..d2dc97ca2 100644 --- a/src/Magnum/Math/Frustum.h +++ b/src/Magnum/Math/Frustum.h @@ -130,7 +130,9 @@ template class Frustum { * @return One-dimensional array of length `24`. */ T* data() { return _data[0].data(); } - constexpr const T* data() const { return _data[0].data(); } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr const T* data() const { return _data[0].data(); } #ifdef MAGNUM_BUILD_DEPRECATED /** diff --git a/src/Magnum/Math/Matrix3.h b/src/Magnum/Math/Matrix3.h index 72a3593e8..32db18db8 100644 --- a/src/Magnum/Math/Matrix3.h +++ b/src/Magnum/Math/Matrix3.h @@ -550,7 +550,9 @@ template class Matrix3: public Matrix3x3 { * @see @ref up(), @ref Vector2::xAxis(), @ref Matrix4::right() */ Vector2& right() { return (*this)[0].xy(); } - constexpr Vector2 right() const { return (*this)[0].xy(); } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr Vector2 right() const { return (*this)[0].xy(); } /** * @brief Up-pointing 2D vector @@ -566,7 +568,9 @@ template class Matrix3: public Matrix3x3 { * @see @ref right(), @ref Vector2::yAxis(), @ref Matrix4::up() */ Vector2& up() { return (*this)[1].xy(); } - constexpr Vector2 up() const { return (*this)[1].xy(); } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr Vector2 up() const { return (*this)[1].xy(); } /** * @brief 2D translation part of the matrix @@ -584,7 +588,9 @@ template class Matrix3: public Matrix3x3 { * @ref Matrix4::translation() */ Vector2& translation() { return (*this)[2].xy(); } - constexpr Vector2 translation() const { return (*this)[2].xy(); } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr Vector2 translation() const { return (*this)[2].xy(); } /** * @brief Inverted rigid transformation matrix diff --git a/src/Magnum/Math/Matrix4.h b/src/Magnum/Math/Matrix4.h index 630b9b357..eabae3fe9 100644 --- a/src/Magnum/Math/Matrix4.h +++ b/src/Magnum/Math/Matrix4.h @@ -838,7 +838,9 @@ template class Matrix4: public Matrix4x4 { * @ref Matrix3::right() */ Vector3& right() { return (*this)[0].xyz(); } - constexpr Vector3 right() const { return (*this)[0].xyz(); } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr Vector3 right() const { return (*this)[0].xyz(); } /** * @brief Up-pointing 3D vector @@ -856,7 +858,9 @@ template class Matrix4: public Matrix4x4 { * @ref Matrix3::up() */ Vector3& up() { return (*this)[1].xyz(); } - constexpr Vector3 up() const { return (*this)[1].xyz(); } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr Vector3 up() const { return (*this)[1].xyz(); } /** * @brief Backward-pointing 3D vector @@ -873,7 +877,9 @@ template class Matrix4: public Matrix4x4 { * @see @ref right(), @ref up(), @ref Vector3::yAxis() */ Vector3& backward() { return (*this)[2].xyz(); } - constexpr Vector3 backward() const { return (*this)[2].xyz(); } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr Vector3 backward() const { return (*this)[2].xyz(); } /** * @brief 3D translation part of the matrix @@ -892,7 +898,9 @@ template class Matrix4: public Matrix4x4 { * @ref Matrix3::translation() */ Vector3& translation() { return (*this)[3].xyz(); } - constexpr Vector3 translation() const { return (*this)[3].xyz(); } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr Vector3 translation() const { return (*this)[3].xyz(); } /** * @brief Inverted rigid transformation matrix diff --git a/src/Magnum/Math/Quaternion.h b/src/Magnum/Math/Quaternion.h index a419be10b..4beb9e9bd 100644 --- a/src/Magnum/Math/Quaternion.h +++ b/src/Magnum/Math/Quaternion.h @@ -335,7 +335,9 @@ template class Quaternion { * @see @ref vector(), @ref scalar() */ T* data() { return _vector.data(); } - constexpr const T* data() const { return _vector.data(); } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr const T* data() const { return _vector.data(); } /** @brief Equality comparison */ bool operator==(const Quaternion& other) const { @@ -361,13 +363,17 @@ template class Quaternion { /** @brief Vector part (@f$ \boldsymbol{q}_V @f$) */ Vector3& vector() { return _vector; } + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ /* Returning const so it's possible to call constexpr functions on the result. WTF, C++?! */ - constexpr const Vector3 vector() const { return _vector; } /**< @overload */ + constexpr const Vector3 vector() const { return _vector; } /** @brief Scalar part (@f$ q_S @f$) */ T& scalar() { return _scalar; } - constexpr T scalar() const { return _scalar; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T scalar() const { return _scalar; } /** * @brief Rotation angle of a unit quaternion diff --git a/src/Magnum/Math/Range.h b/src/Magnum/Math/Range.h index 7ef674ae4..d834537d9 100644 --- a/src/Magnum/Math/Range.h +++ b/src/Magnum/Math/Range.h @@ -171,9 +171,11 @@ template class Range { T* data() { return dataInternal(typename std::conditional::type{}); } + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ constexpr const T* data() const { return dataInternal(typename std::conditional::type{}); - } /**< @overload */ + } /** * @brief Minimal coordinates (inclusive) @@ -183,7 +185,9 @@ template class Range { * @ref Range3D::backBottomLeft() */ VectorType& min() { return _min; } - constexpr const VectorType min() const { return _min; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr const VectorType min() const { return _min; } /** * @brief Maximal coordinates (exclusive) @@ -193,7 +197,9 @@ template class Range { * @ref Range3D::frontTopRight() */ VectorType& max() { return _max; } - constexpr const VectorType max() const { return _max; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr const VectorType max() const { return _max; } /** * @brief Range size @@ -402,7 +408,9 @@ template class Range2D: public Range<2, T> { * Equivalent to @ref min(). */ Vector2& bottomLeft() { return Range<2, T>::min(); } - constexpr Vector2 bottomLeft() const { return Range<2, T>::min(); } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr Vector2 bottomLeft() const { return Range<2, T>::min(); } /** @brief Bottom right corner */ constexpr Vector2 bottomRight() const { @@ -420,23 +428,33 @@ template class Range2D: public Range<2, T> { * Equivalent to @ref max(). */ Vector2& topRight() { return Range<2, T>::max(); } - constexpr Vector2 topRight() const { return Range<2, T>::max(); } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr Vector2 topRight() const { return Range<2, T>::max(); } /** @brief Left edge */ T& left() { return Range<2, T>::min().x(); } - constexpr T left() const { return Range<2, T>::min().x(); } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T left() const { return Range<2, T>::min().x(); } /** @brief Right edge */ T& right() { return Range<2, T>::max().x(); } - constexpr T right() const { return Range<2, T>::max().x(); } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T right() const { return Range<2, T>::max().x(); } /** @brief Bottom edge */ T& bottom() { return Range<2, T>::min().y(); } - constexpr T bottom() const { return Range<2, T>::min().y(); } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T bottom() const { return Range<2, T>::min().y(); } /** @brief Top edge */ T& top() { return Range<2, T>::max().y(); } - constexpr T top() const { return Range<2, T>::max().y(); } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T top() const { return Range<2, T>::max().y(); } /** @brief Range in the X axis */ constexpr Range<1, T> x() const { @@ -530,7 +548,9 @@ template class Range3D: public Range<3, T> { * Equivalent to @ref min(). */ Vector3& backBottomLeft() { return Range<3, T>::min(); } - constexpr Vector3 backBottomLeft() const { return Range<3, T>::min(); } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr Vector3 backBottomLeft() const { return Range<3, T>::min(); } /** @brief Back bottom right corner */ constexpr Vector3 backBottomRight() const { @@ -553,7 +573,9 @@ template class Range3D: public Range<3, T> { * Equivalent to @ref max(). */ Vector3& frontTopRight() { return Range<3, T>::max(); } - constexpr Vector3 frontTopRight() const { return Range<3, T>::max(); } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr Vector3 frontTopRight() const { return Range<3, T>::max(); } /** @brief Front top left corner */ constexpr Vector3 frontTopLeft() const { @@ -572,27 +594,39 @@ template class Range3D: public Range<3, T> { /** @brief Left edge */ T& left() { return Range<3, T>::min().x(); } - constexpr T left() const { return Range<3, T>::min().x(); } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T left() const { return Range<3, T>::min().x(); } /** @brief Right edge */ T& right() { return Range<3, T>::max().x(); } - constexpr T right() const { return Range<3, T>::max().x(); } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T right() const { return Range<3, T>::max().x(); } /** @brief Bottom edge */ T& bottom() { return Range<3, T>::min().y(); } - constexpr T bottom() const { return Range<3, T>::min().y(); } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T bottom() const { return Range<3, T>::min().y(); } /** @brief Top edge */ T& top() { return Range<3, T>::max().y(); } - constexpr T top() const { return Range<3, T>::max().y(); } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T top() const { return Range<3, T>::max().y(); } /** @brief Back edge */ T& back() { return Range<3, T>::min().z(); } - constexpr T back() const { return Range<3, T>::min().z(); } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T back() const { return Range<3, T>::min().z(); } /** @brief Front edge */ T& front() { return Range<3, T>::max().z(); } - constexpr T front() const { return Range<3, T>::max().z(); } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T front() const { return Range<3, T>::max().z(); } /** @brief Range in the X axis */ constexpr Range<1, T> x() const { diff --git a/src/Magnum/Math/RectangularMatrix.h b/src/Magnum/Math/RectangularMatrix.h index 486ccef82..ec93790b7 100644 --- a/src/Magnum/Math/RectangularMatrix.h +++ b/src/Magnum/Math/RectangularMatrix.h @@ -157,7 +157,9 @@ template class RectangularMatrix { * @see @ref operator[]() */ T* data() { return _data[0].data(); } - constexpr const T* data() const { return _data[0].data(); } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr const T* data() const { return _data[0].data(); } /** * @brief Column at given position @@ -170,8 +172,10 @@ template class RectangularMatrix { * @see @ref row(), @ref data() */ Vector& operator[](std::size_t col) { return _data[col]; } + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ /* returns const& so [][] operations are also constexpr */ - constexpr const Vector& operator[](std::size_t col) const { return _data[col]; } /**< @overload */ + constexpr const Vector& operator[](std::size_t col) const { return _data[col]; } /** * @brief Row at given position diff --git a/src/Magnum/Math/Vector.h b/src/Magnum/Math/Vector.h index 7aa391b8f..ab9f6b829 100644 --- a/src/Magnum/Math/Vector.h +++ b/src/Magnum/Math/Vector.h @@ -231,7 +231,9 @@ template class Vector { * @see @ref operator[]() */ T* data() { return _data; } - constexpr const T* data() const { return _data; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr const T* data() const { return _data; } /** * @brief Value at given position @@ -239,7 +241,9 @@ template class Vector { * @see @ref data() */ T& operator[](std::size_t pos) { return _data[pos]; } - constexpr T operator[](std::size_t pos) const { return _data[pos]; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T operator[](std::size_t pos) const { return _data[pos]; } /** * @brief Equality comparison diff --git a/src/Magnum/Math/Vector2.h b/src/Magnum/Math/Vector2.h index f4474db29..3d7a7123d 100644 --- a/src/Magnum/Math/Vector2.h +++ b/src/Magnum/Math/Vector2.h @@ -141,10 +141,17 @@ template class Vector2: public Vector<2, T> { /** @brief Copy constructor */ constexpr /*implicit*/ Vector2(const Vector<2, T>& other) noexcept: Vector<2, T>(other) {} - T& x() { return Vector<2, T>::_data[0]; } /**< @brief X component */ - constexpr T x() const { return Vector<2, T>::_data[0]; } /**< @overload */ - T& y() { return Vector<2, T>::_data[1]; } /**< @brief Y component */ - constexpr T y() const { return Vector<2, T>::_data[1]; } /**< @overload */ + /** @brief X component */ + T& x() { return Vector<2, T>::_data[0]; } + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T x() const { return Vector<2, T>::_data[0]; } + + /** @brief Y component */ + T& y() { return Vector<2, T>::_data[1]; } + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T y() const { return Vector<2, T>::_data[1]; } /** * @brief Perpendicular vector diff --git a/src/Magnum/Math/Vector3.h b/src/Magnum/Math/Vector3.h index e6e56b077..939277edf 100644 --- a/src/Magnum/Math/Vector3.h +++ b/src/Magnum/Math/Vector3.h @@ -177,7 +177,9 @@ template class Vector3: public Vector<3, T> { * @see @ref r() */ T& x() { return Vector<3, T>::_data[0]; } - constexpr T x() const { return Vector<3, T>::_data[0]; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T x() const { return Vector<3, T>::_data[0]; } /** * @brief Y component @@ -185,7 +187,9 @@ template class Vector3: public Vector<3, T> { * @see @ref g() */ T& y() { return Vector<3, T>::_data[1]; } - constexpr T y() const { return Vector<3, T>::_data[1]; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T y() const { return Vector<3, T>::_data[1]; } /** * @brief Z component @@ -193,7 +197,9 @@ template class Vector3: public Vector<3, T> { * @see @ref b() */ T& z() { return Vector<3, T>::_data[2]; } - constexpr T z() const { return Vector<3, T>::_data[2]; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T z() const { return Vector<3, T>::_data[2]; } /** * @brief R component @@ -201,7 +207,9 @@ template class Vector3: public Vector<3, T> { * Equivalent to @ref x(). */ T& r() { return Vector<3, T>::_data[0]; } - constexpr T r() const { return Vector<3, T>::_data[0]; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T r() const { return Vector<3, T>::_data[0]; } /** * @brief G component @@ -209,7 +217,9 @@ template class Vector3: public Vector<3, T> { * Equivalent to @ref y(). */ T& g() { return Vector<3, T>::_data[1]; } - constexpr T g() const { return Vector<3, T>::_data[1]; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T g() const { return Vector<3, T>::_data[1]; } /** * @brief B component @@ -217,7 +227,9 @@ template class Vector3: public Vector<3, T> { * Equivalent to @ref z(). */ T& b() { return Vector<3, T>::_data[2]; } - constexpr T b() const { return Vector<3, T>::_data[2]; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T b() const { return Vector<3, T>::_data[2]; } /** * @brief XY part of the vector @@ -226,9 +238,11 @@ template class Vector3: public Vector<3, T> { * @see @ref swizzle() */ Vector2& xy() { return Vector2::from(Vector<3, T>::data()); } + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ constexpr const Vector2 xy() const { return {Vector<3, T>::_data[0], Vector<3, T>::_data[1]}; - } /**< @overload */ + } MAGNUM_VECTOR_SUBCLASS_IMPLEMENTATION(3, Vector3) }; diff --git a/src/Magnum/Math/Vector4.h b/src/Magnum/Math/Vector4.h index c90182a30..be2d1fe2e 100644 --- a/src/Magnum/Math/Vector4.h +++ b/src/Magnum/Math/Vector4.h @@ -108,7 +108,9 @@ template class Vector4: public Vector<4, T> { * @see @ref r() */ T& x() { return Vector<4, T>::_data[0]; } - constexpr T x() const { return Vector<4, T>::_data[0]; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T x() const { return Vector<4, T>::_data[0]; } /** * @brief Y component @@ -116,7 +118,9 @@ template class Vector4: public Vector<4, T> { * @see @ref g() */ T& y() { return Vector<4, T>::_data[1]; } - constexpr T y() const { return Vector<4, T>::_data[1]; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T y() const { return Vector<4, T>::_data[1]; } /** * @brief Z component @@ -124,7 +128,9 @@ template class Vector4: public Vector<4, T> { * @see @ref b() */ T& z() { return Vector<4, T>::_data[2]; } - constexpr T z() const { return Vector<4, T>::_data[2]; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T z() const { return Vector<4, T>::_data[2]; } /** * @brief W component @@ -132,7 +138,9 @@ template class Vector4: public Vector<4, T> { * @see @ref a() */ T& w() { return Vector<4, T>::_data[3]; } - constexpr T w() const { return Vector<4, T>::_data[3]; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T w() const { return Vector<4, T>::_data[3]; } /** * @brief R component @@ -140,7 +148,9 @@ template class Vector4: public Vector<4, T> { * Equivalent to @ref x(). */ T& r() { return Vector<4, T>::_data[0]; } - constexpr T r() const { return Vector<4, T>::_data[0]; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T r() const { return Vector<4, T>::_data[0]; } /** * @brief G component @@ -148,7 +158,9 @@ template class Vector4: public Vector<4, T> { * Equivalent to @ref y(). */ T& g() { return Vector<4, T>::_data[1]; } - constexpr T g() const { return Vector<4, T>::_data[1]; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T g() const { return Vector<4, T>::_data[1]; } /** * @brief B component @@ -156,7 +168,9 @@ template class Vector4: public Vector<4, T> { * Equivalent to @ref z(). */ T& b() { return Vector<4, T>::_data[2]; } - constexpr T b() const { return Vector<4, T>::_data[2]; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T b() const { return Vector<4, T>::_data[2]; } /** * @brief A component @@ -164,7 +178,9 @@ template class Vector4: public Vector<4, T> { * Equivalent to @ref w(). */ T& a() { return Vector<4, T>::_data[3]; } - constexpr T a() const { return Vector<4, T>::_data[3]; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + constexpr T a() const { return Vector<4, T>::_data[3]; } /** * @brief XYZ part of the vector @@ -173,9 +189,11 @@ template class Vector4: public Vector<4, T> { * @see @ref swizzle(), @ref rgb() */ Vector3& xyz() { return Vector3::from(Vector<4, T>::data()); } + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ constexpr const Vector3 xyz() const { return {Vector<4, T>::_data[0], Vector<4, T>::_data[1], Vector<4, T>::_data[2]}; - } /**< @overload */ + } /** * @brief RGB part of the vector @@ -185,9 +203,11 @@ template class Vector4: public Vector<4, T> { * @see @ref swizzle() */ Vector3& rgb() { return Vector3::from(Vector<4, T>::data()); } + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ constexpr const Vector3 rgb() const { return {Vector<4, T>::_data[0], Vector<4, T>::_data[1], Vector<4, T>::_data[2]}; - } /**< @overload */ + } /** * @brief XY part of the vector @@ -196,9 +216,11 @@ template class Vector4: public Vector<4, T> { * @see @ref swizzle() */ Vector2& xy() { return Vector2::from(Vector<4, T>::data()); } + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ constexpr const Vector2 xy() const { return {Vector<4, T>::_data[0], Vector<4, T>::_data[1]}; - } /**< @overload */ + } MAGNUM_VECTOR_SUBCLASS_IMPLEMENTATION(4, Vector4) }; diff --git a/src/Magnum/Trade/ObjectData2D.h b/src/Magnum/Trade/ObjectData2D.h index 6c8a7ad44..aeb36adcf 100644 --- a/src/Magnum/Trade/ObjectData2D.h +++ b/src/Magnum/Trade/ObjectData2D.h @@ -160,7 +160,9 @@ class MAGNUM_TRADE_EXPORT ObjectData2D { /** @brief Child objects */ std::vector& children() { return _children; } - const std::vector& children() const { return _children; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + const std::vector& children() const { return _children; } /** @brief Flags */ ObjectFlags2D flags() const { return _flags; } diff --git a/src/Magnum/Trade/ObjectData3D.h b/src/Magnum/Trade/ObjectData3D.h index 3c095b60b..2ae57c21b 100644 --- a/src/Magnum/Trade/ObjectData3D.h +++ b/src/Magnum/Trade/ObjectData3D.h @@ -161,7 +161,9 @@ class MAGNUM_TRADE_EXPORT ObjectData3D { /** @brief Child objects */ std::vector& children() { return _children; } - const std::vector& children() const { return _children; } /**< @overload */ + + /** @overload */ /* https://github.com/doxygen/doxygen/issues/7472 */ + const std::vector& children() const { return _children; } /** @brief Flags */ ObjectFlags3D flags() const { return _flags; }