Description
The classes ByteSize and WordSize are used to create a typesafe differentiation between values denoting "words" and "bytes".
The way it works today is that ByteSize (and WordSize) is an int typedef in release builds, and a wrapper class in debug builds. This has the drawback that you can't use these types in overloads, because both types resolve to int in release builds.
I propose that we change this to with typed scoped enums, and get rid of the release/debug difference.
The way it works today is that ByteSize (and WordSize) is an int typedef in release builds, and a wrapper class in debug builds. This has the drawback that you can't use these types in overloads, because both types resolve to int in release builds.
I propose that we change this to with typed scoped enums, and get rid of the release/debug difference.
Attachments
Issue Links
- relates to
-
JDK-8041956 remove ByteSize and WordSize classes
- Closed