@@ -75,40 +75,29 @@ Author: Martin Brain, martin.brain@diffblue.com
7575class invariant_failedt
7676{
7777 private:
78- std::string get_invariant_failed_message (
79- const std::string &file,
80- const std::string &function,
81- int line,
82- const std::string &backtrace,
83- const std::string &reason) const ;
84-
85- public:
8678 const std::string file;
8779 const std::string function;
8880 const int line;
8981 const std::string backtrace;
90- const std::string reason;
9182 const std::string condition;
83+ const std::string reason;
9284
93- std::string what () const noexcept
94- {
95- return get_invariant_failed_message (
96- file, function, line, backtrace, reason);
97- };
85+ public:
86+ std::string what () const noexcept ;
9887
9988 invariant_failedt (
10089 const std::string &_file,
10190 const std::string &_function,
10291 int _line,
10392 const std::string &_backtrace,
104- const std::string &_reason ,
105- const std::string &_condition )
93+ const std::string &_condition ,
94+ const std::string &_reason )
10695 : file(_file),
10796 function (_function),
10897 line(_line),
10998 backtrace(_backtrace),
110- reason(_reason ),
111- condition(_condition )
99+ condition(_condition ),
100+ reason(_reason )
112101 {
113102 }
114103};
@@ -172,8 +161,8 @@ invariant_violated_structured(
172161 function,
173162 line,
174163 backtrace,
175- std::forward<Params>(params)... ,
176- condition );
164+ condition ,
165+ std::forward<Params>(params)... );
177166 // We now have a structured exception ready to use;
178167 // in future this is the place to put a 'throw'.
179168 report_exception_to_stderr (to_throw);
@@ -232,8 +221,8 @@ invariant_violated_string(
232221 __FILE__, \
233222 __this_function__, \
234223 __LINE__, \
235- __VA_ARGS__, \
236- #CONDITION ); /* NOLINT */ \
224+ #CONDITION, \
225+ __VA_ARGS__ ); /* NOLINT */ \
237226 } while (false )
238227
239228#endif // End CPROVER_DO_NOT_CHECK / CPROVER_ASSERT / ... if block
0 commit comments