From 407bad369377cc05e96edd1e6e4264fa99736f85 Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Mon, 4 Nov 2024 11:21:55 -0800 Subject: [PATCH] add noexcept Signed-off-by: Nikolaj Bjorner --- src/tactic/tactic_exception.h | 2 +- src/util/checked_int64.h | 2 +- src/util/mpff.h | 6 +++--- src/util/mpfx.h | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/tactic/tactic_exception.h b/src/tactic/tactic_exception.h index 95121c5d0..9a3c2155b 100644 --- a/src/tactic/tactic_exception.h +++ b/src/tactic/tactic_exception.h @@ -26,7 +26,7 @@ protected: std::string m_msg; public: tactic_exception(std::string && msg) : m_msg(std::move(msg)) {} - char const * what() const override { return m_msg.c_str(); } + char const * what() const noexcept override { return m_msg.c_str(); } }; #define TACTIC_CANCELED_MSG Z3_CANCELED_MSG diff --git a/src/util/checked_int64.h b/src/util/checked_int64.h index 5d2e0953e..65a80de6a 100644 --- a/src/util/checked_int64.h +++ b/src/util/checked_int64.h @@ -29,7 +29,7 @@ Revision History: class overflow_exception : public z3_exception { - char const* what() const override { return "checked_int64 overflow/underflow"; } + char const* what() const noexcept override { return "checked_int64 overflow/underflow"; } }; template diff --git a/src/util/mpff.h b/src/util/mpff.h index d74785f44..8ff9bb65a 100644 --- a/src/util/mpff.h +++ b/src/util/mpff.h @@ -182,15 +182,15 @@ public: static bool field() { return true; } class exception : public z3_exception { - char const * what() const override { return "multi-precision floating point (mpff) exception"; } + char const * what() const noexcept override { return "multi-precision floating point (mpff) exception"; } }; class overflow_exception : public exception { - char const * what() const override { return "multi-precision floating point (mpff) overflow"; } + char const * what() const noexcept override { return "multi-precision floating point (mpff) overflow"; } }; class div0_exception : public exception { - char const * what() const override { return "multi-precision floating point (mpff) division by zero"; } + char const * what() const noexcept override { return "multi-precision floating point (mpff) division by zero"; } }; mpff_manager(unsigned prec = 2, unsigned initial_capacity = 1024); diff --git a/src/util/mpfx.h b/src/util/mpfx.h index f18ac3ee7..cb6f66567 100644 --- a/src/util/mpfx.h +++ b/src/util/mpfx.h @@ -129,15 +129,15 @@ public: static bool field() { return true; } class exception : public z3_exception { - char const * what() const override { return "multi-precision fixed point (mpfx) exception"; } + char const * what() const noexcept override { return "multi-precision fixed point (mpfx) exception"; } }; class overflow_exception : public exception { - char const * what() const override { return "multi-precision fixed point (mpfx) overflow"; } + char const * what() const noexcept override { return "multi-precision fixed point (mpfx) overflow"; } }; class div0_exception : public exception { - char const * what() const override { return "multi-precision fixed point (mpfx) division by zero"; } + char const * what() const noexcept override { return "multi-precision fixed point (mpfx) division by zero"; } }; mpfx_manager(unsigned int_sz = 2, unsigned frac_sz = 1, unsigned initial_capacity = 1024);