Skip to content

Commit 7b3a20b

Browse files
committed
mempool: apply rule of 5 to epochguard.h, fix compiler warnings
1 parent f8b20fd commit 7b3a20b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/util/epochguard.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ class LOCKABLE Epoch
4040
Epoch() = default;
4141
Epoch(const Epoch&) = delete;
4242
Epoch& operator=(const Epoch&) = delete;
43+
Epoch(Epoch&&) = delete;
44+
Epoch& operator=(Epoch&&) = delete;
45+
~Epoch() = default;
4346

4447
bool guarded() const { return m_guarded; }
4548

@@ -51,6 +54,13 @@ class LOCKABLE Epoch
5154
// only allow modification via Epoch member functions
5255
friend class Epoch;
5356
Marker& operator=(const Marker&) = delete;
57+
58+
public:
59+
Marker() = default;
60+
Marker(const Marker&) = default;
61+
Marker(Marker&&) = delete;
62+
Marker& operator=(Marker&&) = delete;
63+
~Marker() = default;
5464
};
5565

5666
class SCOPED_LOCKABLE Guard

0 commit comments

Comments
 (0)