-
Notifications
You must be signed in to change notification settings - Fork 591
Closed
Labels
Description
The JNI of container classes generated by:
infoMap.put(new Info("std::pair<int,int>").pointerTypes("IntPair").define());
infoMap.put(new Info("std::optional<std::pair<int,int> >").pointerTypes("IntPairOptional").define());
does't compile, with errors like:
error: 'class std::optional<std::pair<int, int> >' has no member named 'first'
1452 | int rval = ptr->first;
The optional
container passes the first
and second
function members of std::pair
through, which can be practical, but there seems to be missing an indirection. The line above should be:
int rval = (*ptr)->first;