From 91a2ab35b63ec838ded0ba796de46164a0ea8270 Mon Sep 17 00:00:00 2001 From: Stephane Del Pino <stephane.delpino44@gmail.com> Date: Sun, 22 Jul 2018 00:51:09 +0200 Subject: [PATCH] Replace noexcept by noexcept(NO_ASSERT) for access operators Fixes #1 --- src/algebra/TinyMatrix.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/algebra/TinyMatrix.hpp b/src/algebra/TinyMatrix.hpp index 29a5d6611..2eced15cf 100644 --- a/src/algebra/TinyMatrix.hpp +++ b/src/algebra/TinyMatrix.hpp @@ -186,14 +186,14 @@ public: } KOKKOS_INLINE_FUNCTION - constexpr T& operator()(const size_t& i, const size_t& j) noexcept + constexpr T& operator()(const size_t& i, const size_t& j) noexcept(NO_ASSERT) { Assert((i<N) and (j<N)); return m_values[_index(i,j)]; } KOKKOS_INLINE_FUNCTION - constexpr const T& operator()(const size_t& i, const size_t& j) const noexcept + constexpr const T& operator()(const size_t& i, const size_t& j) const noexcept(NO_ASSERT) { Assert((i<N) and (j<N)); return m_values[_index(i,j)]; @@ -368,7 +368,7 @@ template <size_t N, typename T> KOKKOS_INLINE_FUNCTION constexpr TinyMatrix<N-1,T> getMinor(const TinyMatrix<N,T>& A, const size_t& I, - const size_t& J) noexcept + const size_t& J) { static_assert(N>=2, "minor calculation requires at least 2x2 matrices"); Assert((I<N) and (J<N)); -- GitLab