mirror of
https://github.com/google/flatbuffers.git
synced 2025-04-08 09:12:14 +08:00
* [C++] Add a failing unit test for #7516 (Rare bad buffer content alignment if sizeof(T) != alignof(T)) * [C++] Fix final buffer alignment when using an array of structs * A struct can have an arbitrary size and therefore sizeof(struct) == alignof(struct) does not hold anymore as for value primitives. * This patch fixes this by introducing alignment parameters to various CreateVector*/StartVector calls. * Closes #7516
13 lines
187 B
C++
13 lines
187 B
C++
#ifndef TESTS_ALIGNMENT_TEST_H
|
|
#define TESTS_ALIGNMENT_TEST_H
|
|
|
|
namespace flatbuffers {
|
|
namespace tests {
|
|
|
|
void AlignmentTest();
|
|
|
|
} // namespace tests
|
|
} // namespace flatbuffers
|
|
|
|
#endif
|