Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common: Make SmallVector work with non-standard-layout types. #13310

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

jordan-woyak
Copy link
Member

Elements are now constructed with placement-new.

@jordan-woyak jordan-woyak force-pushed the small-vec-placement-new branch 4 times, most recently from 96cffa6 to 2712f23 Compare January 26, 2025 03:13
@AdmiralCurtiss
Copy link
Contributor

This looks pretty good to me, but can you add some assert()s? m_size < MaxSize in emplace_back(), m_size > 0 in pop_back(), new_size <= MaxSize in resize(), that kinda stuff.

@jordan-woyak jordan-woyak force-pushed the small-vec-placement-new branch from 2712f23 to 41365ab Compare January 26, 2025 03:26
@jordan-woyak jordan-woyak force-pushed the small-vec-placement-new branch from 41365ab to 9777e8e Compare January 26, 2025 19:03
Copy link
Contributor

@AdmiralCurtiss AdmiralCurtiss left a comment

Choose a reason for hiding this comment

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

Untested.

@JMC47 JMC47 merged commit 897978e into dolphin-emu:master Jan 29, 2025
13 checks passed
@jordan-woyak jordan-woyak deleted the small-vec-placement-new branch January 29, 2025 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants