warn on unused result

This commit is contained in:
conrad
2021-09-22 01:16:39 +10:00
parent 9f20635676
commit 3e8ff3e586
4 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ struct BaseCube_eval_Cube
template<typename elem_type, typename derived>
struct BaseCube_eval_expr
{
arma_inline Cube<elem_type> eval() const; //!< force the immediate evaluation of a delayed expression
inline arma_warn_unused Cube<elem_type> eval() const; //!< force the immediate evaluation of a delayed expression
};
+2 -1
View File
@@ -431,7 +431,8 @@ BaseCube_eval_Cube<elem_type, derived>::eval() const
// extra functions defined in BaseCube_eval_expr
template<typename elem_type, typename derived>
arma_inline
inline
arma_warn_unused
Cube<elem_type>
BaseCube_eval_expr<elem_type, derived>::eval() const
{
+1 -1
View File
@@ -31,7 +31,7 @@ struct SpBase_eval_SpMat
template<typename elem_type, typename derived>
struct SpBase_eval_expr
{
inline SpMat<elem_type> eval() const; //!< force the immediate evaluation of a delayed expression
inline arma_warn_unused SpMat<elem_type> eval() const; //!< force the immediate evaluation of a delayed expression
};
+1
View File
@@ -330,6 +330,7 @@ SpBase_eval_SpMat<elem_type, derived>::eval() const
template<typename elem_type, typename derived>
inline
arma_warn_unused
SpMat<elem_type>
SpBase_eval_expr<elem_type, derived>::eval() const
{