-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[z/OS][libc++] Remove align_val_t dependency in small_buffer.h
#114396
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
Changes from 4 commits
a83b5ca
ff95378
f05f144
315a922
af06112
9733748
e00d067
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 |
|---|---|---|
|
|
@@ -66,16 +66,14 @@ class __small_buffer { | |
| if constexpr (__fits_in_buffer<_Stored>) { | ||
| return std::launder(reinterpret_cast<_Stored*>(__buffer_)); | ||
| } else { | ||
| byte* __allocation = static_cast<byte*>(::operator new[](sizeof(_Stored), align_val_t{alignof(_Stored)})); | ||
| std::construct_at(reinterpret_cast<byte**>(__buffer_), __allocation); | ||
| return std::launder(reinterpret_cast<_Stored*>(__allocation)); | ||
| return static_cast<_Stored*>(std::__libcpp_allocate(_BufferSize * sizeof(byte), alignof(_Stored))); | ||
| } | ||
| } | ||
|
|
||
| template <class _Stored> | ||
| _LIBCPP_HIDE_FROM_ABI void __dealloc() noexcept { | ||
| if constexpr (!__fits_in_buffer<_Stored>) | ||
| ::operator delete[](*reinterpret_cast<void**>(__buffer_), sizeof(_Stored), align_val_t{alignof(_Stored)}); | ||
| std::__libcpp_deallocate((void*)__buffer_, _BufferSize * sizeof(byte), alignof(_Stored)); | ||
|
||
| } | ||
|
|
||
| template <class _Stored, class... _Args> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.