[C++] Generate code for vector force_align attribute. (#5796)

* [Flatbuffer] Generate code for force_align with CreateXDirect and Pack functions.

* Fixed Visual Studio 10.0 compile error for std::to_string.

* Fixed Visual Studio 10.0 compile error for std::to_string.
This commit is contained in:
Myrice
2020-03-12 08:32:29 -07:00
committed by GitHub
parent 95a21327fc
commit 9954e09ab7
3 changed files with 41 additions and 2 deletions

View File

@@ -345,6 +345,9 @@ Current understood attributes:
Note: currently not guaranteed to have an effect when used with
`--object-api`, since that may allocate objects at alignments less than
what you specify with `force_align`.
- `force_align: size` (on a vector): force the alignment of this vector to be
something different than what the element size would normally dictate.
Note: Now only work for generated C++ code.
- `bit_flags` (on an unsigned enum): the values of this field indicate bits,
meaning that any unsigned value N specified in the schema will end up
representing 1<<N, or if you don't specify values at all, you'll get