Skip to content

Commit

Permalink
add noexcept
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
  • Loading branch information
NikolajBjorner committed Nov 4, 2024
1 parent 42894f7 commit 407bad3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/tactic/tactic_exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class tactic_exception : public z3_exception {
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
Expand Down
2 changes: 1 addition & 1 deletion src/util/checked_int64.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool CHECK>
Expand Down
6 changes: 3 additions & 3 deletions src/util/mpff.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,15 @@ class mpff_manager {
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);
Expand Down
6 changes: 3 additions & 3 deletions src/util/mpfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,15 @@ class mpfx_manager {
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);
Expand Down

0 comments on commit 407bad3

Please sign in to comment.