No clear way to iterate over a fixed length array using reflection.h
Open
c++
question
stale
- Dominant language
- C++
- Stars
- 26.5k
- Forks
- 3.7k
- PR merge metrics
- No merged PRs in 30d
Description
I cannot find any examples in the code base that use reflection.h with the Array type.
Here is an example .fbs (generated as a .bfbs)
````
struct Bar {
voltage:[float:5];
}
table Foo {
bars:Bar;
}
root_type Foo;
````
When using reflection and you encounter `field->type()->base_type() == reflection::Array`, how are you meant to extract the array field's values? Treating it as a vector causes a crash because the array size is 0.
Contributor guide
Assessment
This issue has not been assessed yet.