Skip to content

Commit

Permalink
* Fix Parser error on template<> containing non-type parameters …
Browse files Browse the repository at this point in the history
…without names (issue bytedeco/javacpp-presets#889)
  • Loading branch information
saudet committed Jun 5, 2020
1 parent c411529 commit 6d84ea7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

* Fix `Parser` error on `template<>` containing non-type parameters without names ([issue bytedeco/javacpp-presets#889](https://github.com/bytedeco/javacpp-presets/issues/889))
* Bundle also the `vcruntime140_1.dll` and `msvcp140_1.dll` redist files from Visual Studio
* Fix `Builder` for different "java.home" path returned by latest JDKs from Oracle ([pull #400](https://github.com/bytedeco/javacpp/pull/400))
* Refactor `Builder` a little to work around issues with Gradle
Expand Down
11 changes: 8 additions & 3 deletions src/main/java/org/bytedeco/javacpp/tools/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -479,9 +479,14 @@ TemplateMap template(Context context) throws ParserException {
} else if (token.match(Token.IDENTIFIER)) {
Type type = type(context); // ignore?
Token t = tokens.get();
String key = t.value;
map.put(key, map.get(key));
token = tokens.next();
if (t.match(Token.IDENTIFIER)) {
String key = t.value;
map.put(key, map.get(key));
token = tokens.next();
} else {
String key = type.cppName;
map.put(key, map.get(key));
}
}
if (!token.match(',', '>')) {
// ignore default argument
Expand Down

0 comments on commit 6d84ea7

Please sign in to comment.