bytedeco/javacpp

Creating instances of C++ templates with parameter packs

オープン

#773 opened on 2024/07/21

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)Java (620 件のフォーク)batch import
enhancementhelp wanted

Repository metrics

Stars
 (4,279 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

I tried to make a struct with a parameter pack template type as such:

template<typename... Args>
struct Foo
{
    virtual void bar(Args... args) {}
};

and I made a function that takes a specialization of this struct:

void fooFunc(Foo<int, double> b) {...}

I put it in an InfoMapper:

infoMap.put(new Info("Foo<int,double>").pointerTypes("TestType").virtualize());

and it did generate a function that takes the correct type

public native void pPackTest(@ByVal TestType b);

But failed to generate the actual .java file (TestType.java) Is there something I can do about this, or is this just a limitation of the parser?

コントリビューターガイド