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 UByte internal constructor(private val data: Byte) : Compara
* A constant holding the maximum value an instance of UByte can have.
*/
public const val MAX_VALUE: UByte = UByte(-1)
/**
* The number of bytes used to represent an instance of UByte in a binary form.
*/
public const val SIZE_BYTES: Int = 1
/**
* The number of bits used to represent an instance of UByte in a binary form.
*/
public const val SIZE_BITS: Int = 8
}
/**