From 9f20635676a6fe83a52e5dc8d2a972754a2cf9d0 Mon Sep 17 00:00:00 2001 From: conrad Date: Wed, 22 Sep 2021 01:09:14 +1000 Subject: [PATCH] warn on unused result --- include/armadillo_bits/Base_bones.hpp | 2 +- include/armadillo_bits/Base_meat.hpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/armadillo_bits/Base_bones.hpp b/include/armadillo_bits/Base_bones.hpp index 21fcbc68..6b10b36f 100644 --- a/include/armadillo_bits/Base_bones.hpp +++ b/include/armadillo_bits/Base_bones.hpp @@ -58,7 +58,7 @@ struct Base_eval_Mat template struct Base_eval_expr { - arma_inline Mat eval() const; //!< force the immediate evaluation of a delayed expression + inline arma_warn_unused Mat eval() const; //!< force the immediate evaluation of a delayed expression }; diff --git a/include/armadillo_bits/Base_meat.hpp b/include/armadillo_bits/Base_meat.hpp index 9b707772..73bd0bd2 100644 --- a/include/armadillo_bits/Base_meat.hpp +++ b/include/armadillo_bits/Base_meat.hpp @@ -922,7 +922,8 @@ Base_eval_Mat::eval() const // extra functions defined in Base_eval_expr template -arma_inline +inline +arma_warn_unused Mat Base_eval_expr::eval() const {