it's same issue (#7846) but not fixed in c++
table nullable_uint {
value: uint;
}
table ping {
id_list: [nullable_uint];
}
auto CreateId(flatbuffers::FlatBufferBuilder& builder) const
{
auto result = std::vector<flatbuffers::Offset<nullable_uint>>();
for (auto& x : this->id)
{
if (x.has_value())
{
auto nullable_builder = nullable_uintBuilder(builder);
nullable_builder.add_value(x.value());
result.push_back(nullable_builder.Finish());
}
else
{
result.push_back(0);
}
}
return builder.CreateVector(result);
}
it's same issue (#7846) but not fixed in c++