Skip to content

copy constructors for exception classes #8391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/solvers/smt2/smt2_tokenizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@
class smt2_errort
{
public:
smt2_errort(smt2_errort &&) = default;

smt2_errort(const smt2_errort &other)
{
// ostringstream does not have a copy constructor

Check warning on line 31 in src/solvers/smt2/smt2_tokenizer.h

View check run for this annotation

Codecov / codecov/patch

src/solvers/smt2/smt2_tokenizer.h#L31

Added line #L31 was not covered by tests
message << other.message.str();
line_no = other.line_no;

Check warning on line 33 in src/solvers/smt2/smt2_tokenizer.h

View check run for this annotation

Codecov / codecov/patch

src/solvers/smt2/smt2_tokenizer.h#L33

Added line #L33 was not covered by tests
}

smt2_errort(const std::string &_message, unsigned _line_no)
: line_no(_line_no)
{
Expand Down
9 changes: 9 additions & 0 deletions src/util/typecheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@
class errort final
{
public:
errort() = default;
errort(errort &&) = default;
errort(const errort &other)

Check warning on line 30 in src/util/typecheck.h

View check run for this annotation

Codecov / codecov/patch

src/util/typecheck.h#L30

Added line #L30 was not covered by tests
{
// ostringstream does not have a copy constructor
message << other.message.str();
__location = other.__location;
}

std::string what() const
{
return message.str();
Expand Down
Loading