Skip to content

Commit

Permalink
Added C++17 [[nodiscard]] support #1217
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe-lunarg committed Feb 8, 2024
1 parent 9356f40 commit d22f530
Show file tree
Hide file tree
Showing 17 changed files with 212 additions and 201 deletions.
10 changes: 9 additions & 1 deletion glm/detail/setup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,13 @@
# define GLM_IF_CONSTEXPR if
#endif

// [nodiscard]
#if GLM_LANG & GLM_LANG_CXX17_FLAG
# define GLM_NODISCARD [[nodiscard]]
#else
# define GLM_NODISCARD
#endif

//
#if GLM_LANG & GLM_LANG_CXX11_FLAG
# define GLM_HAS_ASSIGNABLE 1
Expand Down Expand Up @@ -486,7 +493,8 @@
# define GLM_NEVER_INLINE
#endif//defined(GLM_FORCE_INLINE)

#define GLM_FUNC_DECL GLM_CUDA_FUNC_DECL
#define GLM_FUNC_DECL GLM_NODISCARD GLM_CUDA_FUNC_DECL
#define GLM_FUNC_DISCARD_DECL GLM_CUDA_FUNC_DECL
#define GLM_FUNC_QUALIFIER GLM_CUDA_FUNC_DEF GLM_INLINE

// Do not use CUDA function qualifiers on CUDA compiler when functions are made default
Expand Down
22 changes: 11 additions & 11 deletions glm/detail/type_mat2x2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,28 +73,28 @@ namespace glm
// -- Unary arithmetic operators --

template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator=(mat<2, 2, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator=(mat<2, 2, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator+=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator+=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator+=(mat<2, 2, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator+=(mat<2, 2, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator-=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator-=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator-=(mat<2, 2, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator-=(mat<2, 2, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator*=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator*=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator*=(mat<2, 2, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator*=(mat<2, 2, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator/=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator/=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator/=(mat<2, 2, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator/=(mat<2, 2, U, Q> const& m);

// -- Increment and decrement operators --

GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator++ ();
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator-- ();
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator++ ();
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator-- ();
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator++(int);
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator--(int);
};
Expand Down
18 changes: 9 additions & 9 deletions glm/detail/type_mat2x3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,24 +74,24 @@ namespace glm
// -- Unary arithmetic operators --

template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator=(mat<2, 3, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator=(mat<2, 3, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator+=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator+=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator+=(mat<2, 3, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator+=(mat<2, 3, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator-=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator-=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator-=(mat<2, 3, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator-=(mat<2, 3, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator*=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator*=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator/=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator/=(U s);

// -- Increment and decrement operators --

GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator++ ();
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator-- ();
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator++ ();
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator-- ();
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator++(int);
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator--(int);
};
Expand Down
18 changes: 9 additions & 9 deletions glm/detail/type_mat2x4.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,24 +76,24 @@ namespace glm
// -- Unary arithmetic operators --

template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator=(mat<2, 4, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator=(mat<2, 4, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator+=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator+=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator+=(mat<2, 4, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator+=(mat<2, 4, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator-=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator-=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator-=(mat<2, 4, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator-=(mat<2, 4, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator*=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator*=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator/=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator/=(U s);

// -- Increment and decrement operators --

GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator++ ();
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator-- ();
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator++ ();
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator-- ();
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator++(int);
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator--(int);
};
Expand Down
18 changes: 9 additions & 9 deletions glm/detail/type_mat3x2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,24 +81,24 @@ namespace glm
// -- Unary arithmetic operators --

template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator=(mat<3, 2, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator=(mat<3, 2, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator+=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator+=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator+=(mat<3, 2, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator+=(mat<3, 2, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator-=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator-=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator-=(mat<3, 2, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator-=(mat<3, 2, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator*=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator*=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator/=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator/=(U s);

// -- Increment and decrement operators --

GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator++ ();
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator-- ();
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator++ ();
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator-- ();
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator++(int);
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator--(int);
};
Expand Down
22 changes: 11 additions & 11 deletions glm/detail/type_mat3x3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,28 +80,28 @@ namespace glm
// -- Unary arithmetic operators --

template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator=(mat<3, 3, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator=(mat<3, 3, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator+=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator+=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator+=(mat<3, 3, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator+=(mat<3, 3, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator-=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator-=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator-=(mat<3, 3, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator-=(mat<3, 3, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator*=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator*=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator*=(mat<3, 3, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator*=(mat<3, 3, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator/=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator/=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator/=(mat<3, 3, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator/=(mat<3, 3, U, Q> const& m);

// -- Increment and decrement operators --

GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator++();
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator--();
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator++();
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator--();
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator++(int);
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator--(int);
};
Expand Down
18 changes: 9 additions & 9 deletions glm/detail/type_mat3x4.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,24 +81,24 @@ namespace glm
// -- Unary arithmetic operators --

template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator=(mat<3, 4, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator=(mat<3, 4, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator+=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator+=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator+=(mat<3, 4, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator+=(mat<3, 4, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator-=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator-=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator-=(mat<3, 4, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator-=(mat<3, 4, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator*=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator*=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator/=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator/=(U s);

// -- Increment and decrement operators --

GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator++();
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator--();
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator++();
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator--();
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator++(int);
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator--(int);
};
Expand Down
18 changes: 9 additions & 9 deletions glm/detail/type_mat4x2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,24 @@ namespace glm
// -- Unary arithmetic operators --

template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator=(mat<4, 2, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator=(mat<4, 2, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator+=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator+=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator+=(mat<4, 2, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator+=(mat<4, 2, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator-=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator-=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator-=(mat<4, 2, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator-=(mat<4, 2, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator*=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator*=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator/=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator/=(U s);

// -- Increment and decrement operators --

GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator++ ();
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator-- ();
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator++ ();
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator-- ();
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator++(int);
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator--(int);
};
Expand Down
18 changes: 9 additions & 9 deletions glm/detail/type_mat4x3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,24 @@ namespace glm
// -- Unary arithmetic operators --

template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator=(mat<4, 3, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator=(mat<4, 3, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator+=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator+=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator+=(mat<4, 3, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator+=(mat<4, 3, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator-=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator-=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator-=(mat<4, 3, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator-=(mat<4, 3, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator*=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator*=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator/=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator/=(U s);

// -- Increment and decrement operators --

GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q>& operator++();
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q>& operator--();
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 3, T, Q>& operator++();
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 3, T, Q>& operator--();
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator++(int);
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator--(int);
};
Expand Down
22 changes: 11 additions & 11 deletions glm/detail/type_mat4x4.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,28 +85,28 @@ namespace glm
// -- Unary arithmetic operators --

template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator=(mat<4, 4, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator=(mat<4, 4, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator+=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator+=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator+=(mat<4, 4, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator+=(mat<4, 4, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator-=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator-=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator-=(mat<4, 4, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator-=(mat<4, 4, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator*=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator*=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator*=(mat<4, 4, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator*=(mat<4, 4, U, Q> const& m);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator/=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator/=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator/=(mat<4, 4, U, Q> const& m);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator/=(mat<4, 4, U, Q> const& m);

// -- Increment and decrement operators --

GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator++();
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator--();
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator++();
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator--();
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator++(int);
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator--(int);
};
Expand Down
12 changes: 6 additions & 6 deletions glm/detail/type_quat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,17 @@ namespace glm
GLM_DEFAULTED_FUNC_DECL GLM_CONSTEXPR qua<T, Q>& operator=(qua<T, Q> const& q) GLM_DEFAULT;

template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR qua<T, Q>& operator=(qua<U, Q> const& q);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR qua<T, Q>& operator=(qua<U, Q> const& q);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR qua<T, Q>& operator+=(qua<U, Q> const& q);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR qua<T, Q>& operator+=(qua<U, Q> const& q);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR qua<T, Q>& operator-=(qua<U, Q> const& q);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR qua<T, Q>& operator-=(qua<U, Q> const& q);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR qua<T, Q>& operator*=(qua<U, Q> const& q);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR qua<T, Q>& operator*=(qua<U, Q> const& q);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR qua<T, Q>& operator*=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR qua<T, Q>& operator*=(U s);
template<typename U>
GLM_FUNC_DECL GLM_CONSTEXPR qua<T, Q>& operator/=(U s);
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR qua<T, Q>& operator/=(U s);
};

# if GLM_SILENT_WARNINGS == GLM_ENABLE
Expand Down
Loading

0 comments on commit d22f530

Please sign in to comment.