Skip to content

Commit 839394d

Browse files
author
Daniel Kroening
authored
Merge pull request #893 from pkesseli/tempfile-copy-move
Deleted copy/added explicit move constructor.
2 parents 163dfb3 + f107f21 commit 839394d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/util/tempfile.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ class temporary_filet
2929
{
3030
}
3131

32+
// Using the copy constructor would delete the file twice.
33+
temporary_filet(const temporary_filet &)=delete;
34+
35+
temporary_filet(temporary_filet &&other) :
36+
name(std::move(other.name))
37+
{
38+
}
39+
3240
// get the name
3341
std::string operator()() const
3442
{

0 commit comments

Comments
 (0)