Closed
Description
Describe the bug
I have a C++ type that is a pod (with static_assert(!std::is_pod)
it fails, notice the !
)
cargo:warning=src/bindings/osr/client_osr.cc:375:15: error: static assertion failed
cargo:warning= 375 | static_assert(!std::is_pod<cef_rect_t>());
so that means that cef_rect_t
is a pod (according to the c++ function), but calling generate_pod("cef_rect_t")
fails with
called `Result::unwrap()` on an `Err` value: ParseError(AutocxxCodegenError(Conversion(Cpp(UnsafePodType("Type cef_rect_t is a typedef to a complex type")))))
cef_rect_t
is defined as follows:
typedef struct _cef_rect_t {
int x;
int y;
int width;
int height;
} cef_rect_t;
If I specify generate_pod("_cef_rect_t")
(notice the leading underscore), then the generated cef_rect_t
will also be marked as Trivial
, but I still cannot specify generate_pod("cef_rect_t")
, only generate("cef_rect_t")
. The problem is mainly that other structs that contain a cef_rect_t
that cannot be marked as a POD because of this.
Expected behavior
When static_assert(std::is_pod<cef_rect_t>())
passes, I should be able to use generate_pod("cef_rect_t")
Metadata
Metadata
Assignees
Labels
No labels