Should naked pointers (--cpp_ptr_type naked) work with vectors of tables? #8390
Replies: 1 comment
|
This looks like a bug in the code generator rather than an unreasonable expectation on your part. The generated code appears to assume that elements stored in object API vectors support a _o->d[_i].get()which is valid for smart pointers such as aT*When std::vector<aT*>and therefore the generated code should be using: _o->d[_i]instead of: _o->d[_i].get()The fact that this only surfaces with nested vectors of tables suggests that the code path responsible for generating Based on the schema and command line you've provided, I would expect one of two outcomes:
Given that code generation succeeds and produces invalid C++, I'd lean toward the second interpretation. It may be worth opening an issue with the minimal schema and exact |
Uh oh!
There was an error while loading. Please reload this page.
Should it be possible to use 'naked' pointers with vectors of tables? Or is this an unreasonable expectation?
Given fbs file like:
compiled using this command:
creates a _generated.h file which cannot be compiled. (sample errors follow)
All reactions