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

Feature: variant2 #51

Merged
merged 12 commits into from
Aug 26, 2024
Merged

Feature: variant2 #51

merged 12 commits into from
Aug 26, 2024

Conversation

liss-h
Copy link
Contributor

@liss-h liss-h commented Aug 6, 2024

Adds variant2 a more efficient std::variant implementation for exactly two elements.
Should be a drop in replacement for std::variant<T, U> if I did not overlook anything.

POBR version increased because the layout of polymorphic_allocator with 2 allocators changed. But.. we are not using polymorphic_allocator anymore, so not POBR break?

TODO:

  • add (unit) tests, is already indirectly tests through polymorphic allocator
  • add example
  • update readme
  • determine if we consider this a POBR break

@liss-h liss-h added the pobr-breaking-change Breaking change for Persisted Object Binary Representation label Aug 6, 2024
@liss-h liss-h changed the title Feature: variant2 Feature: variant2 Aug 7, 2024
@liss-h liss-h linked an issue Aug 7, 2024 that may be closed by this pull request
CMakeLists.txt Outdated Show resolved Hide resolved
@liss-h liss-h marked this pull request as ready for review August 20, 2024 15:47
@bigerl bigerl requested review from mcb5637 and bigerl and removed request for bigerl August 26, 2024 08:31
Copy link
Contributor

@mcb5637 mcb5637 left a comment

Choose a reason for hiding this comment

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

overall, looks good, just a few small issues.

include/dice/template-library/variant2.hpp Outdated Show resolved Hide resolved
include/dice/template-library/variant2.hpp Show resolved Hide resolved
include/dice/template-library/variant2.hpp Show resolved Hide resolved
include/dice/template-library/variant2.hpp Outdated Show resolved Hide resolved
include/dice/template-library/variant2.hpp Show resolved Hide resolved
include/dice/template-library/variant2.hpp Show resolved Hide resolved
include/dice/template-library/variant2.hpp Show resolved Hide resolved
@liss-h liss-h requested a review from mcb5637 August 26, 2024 10:44
@liss-h liss-h merged commit 7fe712e into develop Aug 26, 2024
6 checks passed
@liss-h liss-h mentioned this pull request Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pobr-breaking-change Breaking change for Persisted Object Binary Representation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add variant2
3 participants