Skip to content

Conversation

@victorstewart
Copy link
Contributor

okay sorry i finally got around to doing this lol

i adhered to all your design commentary here: #120

let me know what you think

@victorstewart victorstewart force-pushed the feature/direct-write-buffer-fix branch from aa09bd2 to 899dd8e Compare November 22, 2025 21:26
- Removed buggy direct write helpers from OutputBufferAdapter.
- Added generic allocateForDirectWrite hook in OutputAdapterBaseCRTP (fails by default).
- Added OutputAlignedBufferAdapter and InputAlignedBufferAdapter with explicit alignment enforcement.
- Implemented allocateForDirectWrite in OutputAlignedBufferAdapter with correct padding and pointer arithmetic.
- Added DirectWriteBuffer extension to simplify usage.
- Added tests verifying alignment and data integrity.
@victorstewart victorstewart force-pushed the feature/direct-write-buffer-fix branch from 899dd8e to e8311c3 Compare November 22, 2025 21:34
Restores the 'is_sufficiently_aligned' helper function in bitsery::details
to resolve build failures in GitHub CI. This function, used by
AlignedBufferAdapters, was missing after a recent rebase.

The function includes two overloads: one for raw pointers and another
for iterators, ensuring correct alignment checks for both cases.
Necessary headers <type_traits> and <memory> have also been added.
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.

1 participant