bindgen icon indicating copy to clipboard operation
bindgen copied to clipboard

[Question] Dealing with classes containing template arguments

Open WhoAteDaCake opened this issue 4 years ago • 0 comments

Hi, sorry, If this is a noob question. I'm trying to bind to a library, which uses chromes v8 base. The class, which is causing me problems is: scoped_refptr can be seen here. It's not a valid camel case name, so when something like scoped_refptr<nu::MenuBar> is seen, it can't convert it.

I tried adding it to classes property, but I then get:

/tmp/.bk5Cpxbindgen:43:32: error: use of class template 'scoped_refptr' requires template arguments
template class BindgenTypeInfo<scoped_refptr>;
                               ^
/home/augustinas/personal/native-ui/ext/yue/include/base/memory/scoped_refptr.h:175:7: note: template is declared here
class scoped_refptr {
      ^
Segmentation fault (core dumped)

What is the correct way to add a definition for it?.

WhoAteDaCake avatar Aug 05 '21 10:08 WhoAteDaCake