Skip to content

Commit 42d86f7

Browse files
committed
fdsdump: add DISABLE_COPY_AND_MOVE macro to common
1 parent 5b59243 commit 42d86f7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/tools/fdsdump/src/common/common.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515

1616
namespace fdsdump {
1717

18+
#define DISABLE_COPY_AND_MOVE(CLASSNAME) \
19+
CLASSNAME ( CLASSNAME &) = delete; \
20+
CLASSNAME (const CLASSNAME &&) = delete; \
21+
CLASSNAME &operator=( CLASSNAME &) = delete; \
22+
CLASSNAME &operator=(const CLASSNAME &&) = delete;
23+
1824
using unique_file = std::unique_ptr<fds_file_t, decltype(&fds_file_close)>;
1925
using unique_iemgr = std::unique_ptr<fds_iemgr_t, decltype(&fds_iemgr_destroy)>;
2026
using unique_filter = std::unique_ptr<fds_ipfix_filter, decltype(&fds_ipfix_filter_destroy)>;

0 commit comments

Comments
 (0)