mirror of
https://github.com/dlang/phobos.git
synced 2025-05-07 19:49:36 +03:00
commit
f3e6c436b2
1 changed files with 11 additions and 2 deletions
|
@ -1928,11 +1928,11 @@ if (is(Unqual!T == bool))
|
||||||
// Fits within the current array
|
// Fits within the current array
|
||||||
if (stuff)
|
if (stuff)
|
||||||
{
|
{
|
||||||
data[$ - 1] |= (1u << rem);
|
data[$ - 1] |= (cast(size_t)1 << rem);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
data[$ - 1] &= ~(1u << rem);
|
data[$ - 1] &= ~(cast(size_t)1 << rem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1959,6 +1959,15 @@ if (is(Unqual!T == bool))
|
||||||
/// ditto
|
/// ditto
|
||||||
alias stableInsertBack = insertBack;
|
alias stableInsertBack = insertBack;
|
||||||
|
|
||||||
|
unittest
|
||||||
|
{
|
||||||
|
Array!bool a;
|
||||||
|
for (int i = 0; i < 100; ++i)
|
||||||
|
a.insertBack(true);
|
||||||
|
foreach (e; a)
|
||||||
|
assert(e);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Removes the value at the front or back of the container. The
|
Removes the value at the front or back of the container. The
|
||||||
stable version behaves the same, but guarantees that ranges
|
stable version behaves the same, but guarantees that ranges
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue