You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, C++ strongly typed enums are mapped to java enums either unsafe, mapping directly to the underlying int type, or safe where only values that are defined in the enum are allowed. This misses the usecase of enums that are used as no-overhead strategy of introducing strongly typed integers like in std::byte.
A possible solution would be to add another enumstrongtype.swg apart fromt the already provided enumtypesafe.swg and enumtypeunsafe.swg, where enumtypesafe.swg:89 is altered in the following way:
public static $javaclassname swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
return new $javaclassname(swigValue);
}
The text was updated successfully, but these errors were encountered:
Currently, C++ strongly typed enums are mapped to java enums either unsafe, mapping directly to the underlying int type, or safe where only values that are defined in the enum are allowed. This misses the usecase of enums that are used as no-overhead strategy of introducing strongly typed integers like in std::byte.
A possible solution would be to add another
enumstrongtype.swg
apart fromt the already providedenumtypesafe.swg
andenumtypeunsafe.swg
, whereenumtypesafe.swg:89
is altered in the following way:The text was updated successfully, but these errors were encountered: