-
Notifications
You must be signed in to change notification settings - Fork 588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] enum class xyz: bool not correctly parsed #388
Comments
… `byte`, and `short` types (issue #388)
Thanks for the report! I've fixed this in commit 01c7278. Now, without /** enum class null_order */
public static final boolean
/** NULL values ordered *after* all other values */
AFTER = 0 != 0,
/** NULL values ordered *before* all other values */
BEFORE = 1 != 0; And with public enum null_order {
/** NULL values ordered *after* all other values */
AFTER(0 != 0),
/** NULL values ordered *before* all other values */
BEFORE(1 != 0);
public final boolean value;
private null_order(boolean v) { this.value = v; }
private null_order(null_order e) { this.value = e.value; }
public null_order intern() { for (null_order e : values()) if (e.value == value) return e; return this; }
@Override public String toString() { return intern().name(); }
} @cansik I've also added additional casts for /** enum Layout */
public static final byte
ANY = (byte)0, // "any" layout
// I/O data layouts
NCHW = (byte)1
... |
I updated my javacpp project and did an mvn install... The preset is still failing I get this now...
The static field isn't defined anywhere, maybe you forgot to check-in something? |
Ah, no, that's something else. I've added support for that in the latest commit. Please try it again! |
All fixed in just released version 1.5.3. Thanks for reporting! |
Javacpp is not translating the cpp boolean enums correctly. Here is the enum defined in cpp
without info.enumerate() it gets translated to
with enumerate() the following is the output.
In both cases it is trying to assign an int value to a boolean. How can we get this to correctly generate the code?
The text was updated successfully, but these errors were encountered: