{"action":"closed","issue":{"url":"https://api.github.com/repos/eqrion/cbindgen/issues/310","repository_url":"https://api.github.com/repos/eqrion/cbindgen","labels_url":"https://api.github.com/repos/eqrion/cbindgen/issues/310/labels{/name}","comments_url":"https://api.github.com/repos/eqrion/cbindgen/issues/310/comments","events_url":"https://api.github.com/repos/eqrion/cbindgen/issues/310/events","html_url":"https://github.com/eqrion/cbindgen/issues/310","id":426851648,"node_id":"MDU6SXNzdWU0MjY4NTE2NDg=","number":310,"title":"Cbindgen generates incomplete types","user":{"login":"playXE","id":41432780,"node_id":"MDQ6VXNlcjQxNDMyNzgw","avatar_url":"https://avatars2.githubusercontent.com/u/41432780?v=4","gravatar_id":"","url":"https://api.github.com/users/playXE","html_url":"https://github.com/playXE","followers_url":"https://api.github.com/users/playXE/followers","following_url":"https://api.github.com/users/playXE/following{/other_user}","gists_url":"https://api.github.com/users/playXE/gists{/gist_id}","starred_url":"https://api.github.com/users/playXE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/playXE/subscriptions","organizations_url":"https://api.github.com/users/playXE/orgs","repos_url":"https://api.github.com/users/playXE/repos","events_url":"https://api.github.com/users/playXE/events{/privacy}","received_events_url":"https://api.github.com/users/playXE/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-03-29T07:22:31Z","updated_at":"2019-03-29T18:59:37Z","closed_at":"2019-03-29T18:59:37Z","author_association":"NONE","body":"For example:\r\n```rust\r\nstruct Assembler {\r\n       pub data: Vec<u8>\r\n}\r\n```\r\nFrom this I get:\r\n```cpp\r\ntemplate <typename T>\r\nstruct Vec;\r\n\r\nstruct Assembler\r\n{\r\n  Vec<uint8_t> data;\r\n};\r\n```\r\nAnd `Vec` in C++ is incomplete when compiling using Clang or GCC. \r\n\r\n## How to fix?\r\nJust changing from `struct Vec` to `struct Vec {}` But that thing doesn't allow manipulations on the vector. \r\nAnother way is generate this definition:\r\n```cpp\r\ntemplate <typename T>\r\nstruct Vec {\r\n      T* buf;\r\n      size_t cap;\r\n      size_t len;\r\n}\r\n```"}}
{"actor":{"display_login":"eqrion"}}