use macros to delete copy and move constructors#112
Draft
wokron wants to merge 2 commits into
Draft
Conversation
There was a problem hiding this comment.
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, andCONDY_DELETE_COPY_MOVEmacros ininclude/condy/utils.hpp. - Replaced repeated
= deletecopy/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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.