aboutsummaryrefslogtreecommitdiff
path: root/libphobos/src/std/bitmanip.d
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2025-01-05 14:24:49 +0100
committerIain Buclaw <ibuclaw@gdcproject.org>2025-01-05 14:24:49 +0100
commita676a516701789730aa482bcef4adcb683ba0140 (patch)
tree6c5b56d13162e537bae0ed373a9addf9be73af56 /libphobos/src/std/bitmanip.d
parent3dfad340cb140d64b8c0ecab05fa329238ebd06b (diff)
downloadgcc-a676a516701789730aa482bcef4adcb683ba0140.zip
gcc-a676a516701789730aa482bcef4adcb683ba0140.tar.gz
gcc-a676a516701789730aa482bcef4adcb683ba0140.tar.bz2
d: Merge upstream dmd, druntime 07bc5b9b3c, phobos de1dea109
Synchronizing with the upstream release of v2.109.0. D front-end changes: - Import dmd v2.109.0. D runtime changes: - Import druntime v2.109.0. Phobos changes: - Import phobos v2.109.0. gcc/d/ChangeLog: * decl.cc (DeclVisitor::finish_vtable): Update for new front-end interface. * dmd/MERGE: Merge upstream dmd 07bc5b9b3c. * dmd/VERSION: Bump version to v2.109.0. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime 07bc5b9b3c. * src/MERGE: Merge upstream phobos de1dea109.
Diffstat (limited to 'libphobos/src/std/bitmanip.d')
-rw-r--r--libphobos/src/std/bitmanip.d7
1 files changed, 7 insertions, 0 deletions
diff --git a/libphobos/src/std/bitmanip.d b/libphobos/src/std/bitmanip.d
index de2ff31..639b821 100644
--- a/libphobos/src/std/bitmanip.d
+++ b/libphobos/src/std/bitmanip.d
@@ -805,6 +805,7 @@ private struct FloatingPointRepresentation(T)
Allows manipulating the fraction, exponent, and sign parts of a
`float` separately. The definition is:
+$(RUNNABLE_EXAMPLE
----
struct FloatRep
{
@@ -819,6 +820,7 @@ struct FloatRep
enum uint bias = 127, fractionBits = 23, exponentBits = 8, signBits = 1;
}
----
+)
*/
alias FloatRep = FloatingPointRepresentation!float;
@@ -874,6 +876,7 @@ alias FloatRep = FloatingPointRepresentation!float;
Allows manipulating the fraction, exponent, and sign parts of a
`double` separately. The definition is:
+$(RUNNABLE_EXAMPLE
----
struct DoubleRep
{
@@ -888,6 +891,7 @@ struct DoubleRep
enum uint bias = 1023, signBits = 1, fractionBits = 52, exponentBits = 11;
}
----
+)
*/
alias DoubleRep = FloatingPointRepresentation!double;
@@ -1050,6 +1054,8 @@ public:
of a type different than `size_t`, firstly because its length should
be a multiple of `size_t.sizeof`, and secondly because how the bits
are mapped:
+
+ $(RUNNABLE_EXAMPLE
---
size_t[] source = [1, 2, 3, 3424234, 724398, 230947, 389492];
enum sbits = size_t.sizeof * 8;
@@ -1060,6 +1066,7 @@ public:
assert(ba[n] == nth_bit);
}
---
+ )
The least significant bit in any `size_t` unit is the starting bit of this
unit, and the most significant bit is the last bit of this unit. Therefore,
passing e.g. an array of `int`s may result in a different `BitArray`