-
Notifications
You must be signed in to change notification settings - Fork 15.5k
[libcxx] adds a size-based representation for vector's unstable ABI
#155330
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -268,7 +268,6 @@ public: | |
| __set_valid_range(pointer __new_begin, pointer __new_end) _NOEXCEPT { | ||
| // Size-based __split_buffers track their size directly: we need to explicitly update the size | ||
| // when the front is adjusted. | ||
| __size_ -= __new_begin - __begin_; | ||
| __begin_ = __new_begin; | ||
| __set_sentinel(__new_end); | ||
| } | ||
|
|
@@ -277,7 +276,6 @@ public: | |
| __set_valid_range(pointer __new_begin, size_type __new_size) _NOEXCEPT { | ||
| // Size-based __split_buffers track their size directly: we need to explicitly update the size | ||
| // when the front is adjusted. | ||
| __size_ -= __new_begin - __begin_; | ||
| __begin_ = __new_begin; | ||
| __set_sentinel(__new_size); | ||
| } | ||
|
|
@@ -316,9 +314,9 @@ public: | |
| } | ||
|
|
||
| _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __swap_without_allocator( | ||
| __split_buffer_pointer_layout<__split_buffer<value_type, __alloc_rr&, __split_buffer_pointer_layout>, | ||
| value_type, | ||
| __alloc_rr&>& __other) _NOEXCEPT { | ||
| __split_buffer_size_layout<__split_buffer<value_type, __alloc_rr&, __split_buffer_size_layout>, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe can be a separate commit; I'm presuming this is simply a bugfix to the previous change adding size-based
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, this was a bug-fix. We don't have a way to test that Again, the benefit of another commit is that it adds documentation, so I'm partial on that front. |
||
| value_type, | ||
| __alloc_rr&>& __other) _NOEXCEPT { | ||
| std::swap(__front_cap_, __other.__front_cap_); | ||
| std::swap(__begin_, __other.__begin_); | ||
| std::swap(__cap_, __other.__cap_); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment says you need to update the size, but said update was deleted by the PR?