Skip to content

How to deal with template taking std::function as arguments? #1051

@egolearner

Description

@egolearner
    template <typename T>
    void set_filter(T &&func) {
       // ...
    }

T's receiver is std::function<bool(uint64_t)>.

We tried to add the following mapping info

        infoMap.put(new Info("std::function<bool(uint64_t)>").pointerTypes("FilterFunction"));
        infoMap.put(new Info("SomeClass::set_filter<std::function<bool(uint64_t)> >&&").javaNames("setFiler"));

mvn install works but the function is omitted from generated java file.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions