Introduce SIZE_BYTES and SIZE_BITS constants for all integral types

#KT-8247 Fixed
This commit is contained in:
Ilya Gorbunov
2018-06-28 00:44:05 +03:00
parent 31d7aae98d
commit 0c50014e7a
17 changed files with 288 additions and 16 deletions
@@ -24,6 +24,16 @@ public inline class UInt internal constructor(private val data: Int) : Comparabl
* A constant holding the maximum value an instance of UInt can have.
*/
public const val MAX_VALUE: UInt = UInt(-1)
/**
* The number of bytes used to represent an instance of UInt in a binary form.
*/
public const val SIZE_BYTES: Int = 4
/**
* The number of bits used to represent an instance of UInt in a binary form.
*/
public const val SIZE_BITS: Int = 32
}
/**