diff --git a/CHANGELOG.md b/CHANGELOG.md index d963b3a5a..ab9c70c48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ + * Add missing space for `const` types when normalizing template arguments in `Parser` ([issue bytedeco/javacpp-presets#165](https://github.com/bytedeco/javacpp-presets/issues/165)) * Make `Builder` fail on `ClassNotFoundException` or `NoClassDefFoundError` instead of logging warnings * Allow `Builder` to generate native libraries with empty `@Platform` annotation even without user defined `native` methods * Enhance `Parser` to support a bit better `&&` tokens and C++11 rvalue references ([issue bytedeco/javacpp-presets#160](https://github.com/bytedeco/javacpp-presets/issues/160)) diff --git a/src/main/java/org/bytedeco/javacpp/tools/Parser.java b/src/main/java/org/bytedeco/javacpp/tools/Parser.java index 8de7746cf..8f5ad140d 100644 --- a/src/main/java/org/bytedeco/javacpp/tools/Parser.java +++ b/src/main/java/org/bytedeco/javacpp/tools/Parser.java @@ -381,6 +381,9 @@ Type[] templateArguments(Context context) throws ParserException { count--; } type.cppName += token; + if (token.match(Token.CONST)) { + type.cppName += " "; + } } if (type.cppName.endsWith("*")) { type.javaName = "PointerPointer";