Skip to content

Commit a29e933

Browse files
authored
Merge pull request #8391 from diffblue/exception-constructors
copy constructors for exception classes
2 parents 29d6f31 + 00690d0 commit a29e933

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/solvers/smt2/smt2_tokenizer.h

+9
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ class smt2_tokenizert
2424
class smt2_errort
2525
{
2626
public:
27+
smt2_errort(smt2_errort &&) = default;
28+
29+
smt2_errort(const smt2_errort &other)
30+
{
31+
// ostringstream does not have a copy constructor
32+
message << other.message.str();
33+
line_no = other.line_no;
34+
}
35+
2736
smt2_errort(const std::string &_message, unsigned _line_no)
2837
: line_no(_line_no)
2938
{

src/util/typecheck.h

+9
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ class typecheckt:public messaget
2525
class errort final
2626
{
2727
public:
28+
errort() = default;
29+
errort(errort &&) = default;
30+
errort(const errort &other)
31+
{
32+
// ostringstream does not have a copy constructor
33+
message << other.message.str();
34+
__location = other.__location;
35+
}
36+
2837
std::string what() const
2938
{
3039
return message.str();

0 commit comments

Comments
 (0)