A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/bytedeco/javacpp/issues/718 below:

Optional pair · Issue #718 · bytedeco/javacpp · GitHub

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;

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4