Skip to content

Problem with C++ function overloading mapping to the same java type #492

@egolearner

Description

@egolearner
class TestTemplate {
public:
       int test(int *a) {}
       int test(unsigned*a) {}
};

JavaCpp will only generate one function

       public native int test(IntPointer a);
       public native int test(IntBuffer a);
       public native int test(int[] a);

It does not work by specifying the following

        infoMap.put(new Info("TestTemplate::test(unsigned *)").javaNames("testUnsigned"));

or

        infoMap.put(new Info("TestTemplate::test(unsigned*)").javaNames("testUnsigned"));

How to help JavaCpp generate both functions?
Any guide is appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions