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

Mac fixes prime tower #2112

Merged
merged 3 commits into from
Jul 3, 2024
Merged

Mac fixes prime tower #2112

merged 3 commits into from
Jul 3, 2024

Conversation

wawanbreton
Copy link
Contributor

@wawanbreton wawanbreton commented Jul 2, 2024

Fix build issue on MAC when using the emplace_back method

The XCode compiler seems to be stricter about structs default constructors, so we can't use emplace_back and the construct-in-place mechanism without manually declaring the constructors, which would be overkill in this case. We don't really need the provided performance improvement because those operations are not done thousands of times. Just use push_back with the explicit struct default constructor.

casperlamboo and others added 3 commits July 2, 2024 16:37
Since we can't have the performance improvements provided by
emplace_back and its construct-in-place mechanism without adding a lot
of code (constructors for the struct), just use push_back to emphasize
the fact that we are constructing the objects then putting them into the
list.
This is fine though, we don't actually need performance in this case.
@rburema rburema merged commit 663753b into main Jul 3, 2024
20 checks passed
@rburema rburema deleted the mac-fixes-prime-tower branch July 3, 2024 07:13
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.

3 participants