Skip to content

use macros to delete copy and move constructors#112

Draft
wokron wants to merge 2 commits into
masterfrom
macro-delete-copy-move
Draft

use macros to delete copy and move constructors#112
wokron wants to merge 2 commits into
masterfrom
macro-delete-copy-move

Conversation

@wokron
Copy link
Copy Markdown
Owner

@wokron wokron commented May 12, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces reusable macros for deleting copy and/or move operations and applies them across the Condy headers to reduce boilerplate and keep non-copyable/non-movable semantics consistent.

Changes:

  • Added CONDY_DELETE_COPY, CONDY_DELETE_MOVE, and CONDY_DELETE_COPY_MOVE macros in include/condy/utils.hpp.
  • Replaced repeated = delete copy/move declarations in multiple types with the new macros.
  • Added #include "condy/utils.hpp" where needed so the macros are available.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
include/condy/utils.hpp Defines the new delete-copy/move macros and uses them in Defer.
include/condy/task.hpp Uses CONDY_DELETE_COPY(TaskBase) and includes utils.hpp.
include/condy/singleton.hpp Uses CONDY_DELETE_COPY_MOVE(ThreadLocalSingleton) and includes utils.hpp.
include/condy/sender_operations.hpp Uses CONDY_DELETE_COPY_MOVE(SenderAwaiter) and includes utils.hpp.
include/condy/runtime.hpp Uses CONDY_DELETE_COPY_MOVE(Runtime) (with utils.hpp included).
include/condy/ring.hpp Uses CONDY_DELETE_COPY_MOVE(Ring) (with utils.hpp included).
include/condy/ring_settings.hpp Uses delete macros for FdTable, BufferTable, RingSettings and includes utils.hpp.
include/condy/provided_buffers.hpp Uses delete macros for provided-buffer queue/pool types and ProvidedBuffer.
include/condy/op_states.hpp Uses delete macros for multiple operation state classes and includes utils.hpp.
include/condy/intrusive.hpp Uses CONDY_DELETE_COPY(...) for intrusive list types and includes utils.hpp.
include/condy/futex.hpp Uses CONDY_DELETE_COPY_MOVE(Futex) and includes utils.hpp.
include/condy/finish_handles.hpp Uses delete macros for finish-handle/handle-box types and includes utils.hpp.
include/condy/channel.hpp Uses CONDY_DELETE_COPY_MOVE(Channel) (with utils.hpp included).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants