mirror of
https://github.com/dlang/phobos.git
synced 2025-05-07 11:37:24 +03:00
bugzilla 3873 std.range.repeat should have popBack defined
This commit is contained in:
parent
093183db7a
commit
5cbe2adf7a
1 changed files with 9 additions and 7 deletions
16
std/range.d
16
std/range.d
|
@ -921,7 +921,7 @@ public:
|
|||
}
|
||||
});
|
||||
|
||||
static if (allSameType && allSatisfy!(hasAssignableElements, R))
|
||||
static if (allSameType && allSatisfy!(hasAssignableElements, R))
|
||||
void opIndexAssign(ElementType v, uint index)
|
||||
{
|
||||
foreach (i, Unused; R)
|
||||
|
@ -1017,10 +1017,10 @@ unittest
|
|||
auto c = chain(foo, bar);
|
||||
c[3] = 42;
|
||||
assert(c[3] == 42);
|
||||
}
|
||||
|
||||
// Make sure bug 3311 is fixed. ChainImpl should compile even if not all
|
||||
// elements are mutable.
|
||||
}
|
||||
|
||||
// Make sure bug 3311 is fixed. ChainImpl should compile even if not all
|
||||
// elements are mutable.
|
||||
auto c = chain( iota(0, 10), iota(0, 10) );
|
||||
}
|
||||
|
||||
|
@ -1408,7 +1408,9 @@ struct Repeat(T)
|
|||
/// Ditto
|
||||
enum bool empty = false;
|
||||
/// Ditto
|
||||
void popFront() {}
|
||||
void popFront() const {}
|
||||
/// Ditto
|
||||
void popBack() const {}
|
||||
/// Ditto
|
||||
ref T opIndex(uint) { return _value; }
|
||||
}
|
||||
|
@ -2567,4 +2569,4 @@ unittest
|
|||
{
|
||||
assert(array(e) == witness[i++]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue