javacpp
javacpp copied to clipboard
Unexpected token '::' in namespace name
Hello,
The first line of the following is raising org.bytedeco.javacpp.tools.ParserException
saying : Unexpected token '::'
.
Exception in thread "main" org.bytedeco.javacpp.tools.ParserException: "thefileconcerned.h":Unexpected token '::'
at org.bytedeco.javacpp.tools.Token.expect(Token.java:114)
at org.bytedeco.javacpp.tools.Parser.namespace(Parser.java:3954)
at org.bytedeco.javacpp.tools.Parser.declarations(Parser.java:4077)
at org.bytedeco.javacpp.tools.Parser.parse(Parser.java:4167)
at org.bytedeco.javacpp.tools.Parser.parse(Parser.java:4322)
at org.bytedeco.javacpp.tools.Builder.parse(Builder.java:95)
at org.bytedeco.javacpp.tools.Builder.build(Builder.java:1095)
at org.bytedeco.javacpp.tools.Builder.main(Builder.java:1450)
namespace namespace1::namespace2
{
// Some code ...
}
I don't know if it is a bug or a limitation ?
This looks like new syntax available starting with C++17: https://en.cppreference.com/w/cpp/language/namespace
We'll need to add support for that. Contributions are welcome!
I didn't know you didn't support C++17 yet!
What is the C++ standard currently supported by JavaCPP? It would be nice if it was written in the README on the home page.
JavaCPP doesn't fully support any version of C++: http://bytedeco.org/faq/
Fixed in commit https://github.com/bytedeco/javacpp/commit/f9b07466dd686ec876be29deb5ffbdf592b3ecca! Please give it a try with the snapshots: http://bytedeco.org/builds/
Fix released with JavaCPP 1.5.9! Thanks for reporting