Skip to content

update RawStorage related code#85

Merged
wokron merged 4 commits into
masterfrom
update-raw-storage
Apr 4, 2026
Merged

update RawStorage related code#85
wokron merged 4 commits into
masterfrom
update-raw-storage

Conversation

@wokron
Copy link
Copy Markdown
Member

@wokron wokron commented Apr 3, 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 updates condy::RawStorage to support in-place construction via a factory (enabling guaranteed copy elision for non-movable/non-copyable types), modernizes object access with std::launder, and adjusts tests and coroutine allocator cleanup to match the updated storage/lifetime patterns.

Changes:

  • Add RawStorage::accept(Factory) and re-route construct(...) through it to enable guaranteed copy elision scenarios.
  • Use std::launder when retrieving objects from raw storage, and similarly launder the allocator pointer in coroutine deallocation.
  • Extend unit tests to cover a non-movable/non-copyable type construction path.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
tests/test_utils.cpp Updates RawStorage test usage and adds a guaranteed copy-elision test case.
include/condy/utils.hpp Introduces RawStorage::accept, updates construct, and changes get() to use std::launder.
include/condy/coro.inl Adds <new> and uses std::launder when accessing the stored allocator during coroutine deallocation.

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

Comment thread include/condy/utils.hpp Outdated
Comment thread include/condy/utils.hpp
@wokron wokron marked this pull request as ready for review April 3, 2026 12:58
@wokron wokron merged commit 2c6b3e5 into master Apr 4, 2026
11 checks passed
@wokron wokron deleted the update-raw-storage branch April 4, 2026 04:11
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