mirror of
https://github.com/dlang/phobos.git
synced 2025-05-06 02:45:12 +03:00
add 'scope' to opApply() parameter
This commit is contained in:
parent
e75831ab22
commit
55e5737525
5 changed files with 10 additions and 10 deletions
|
@ -982,7 +982,7 @@ template each(alias pred = "a")
|
|||
static class S
|
||||
{
|
||||
int x;
|
||||
int opApply(int delegate(ref int _x) dg) { return dg(x); }
|
||||
int opApply(scope int delegate(ref int _x) dg) { return dg(x); }
|
||||
}
|
||||
|
||||
auto s = new S;
|
||||
|
@ -2862,7 +2862,7 @@ The number of seeds must be correspondingly increased.
|
|||
{
|
||||
bool actEmpty;
|
||||
|
||||
int opApply(int delegate(ref int) dg)
|
||||
int opApply(scope int delegate(ref int) dg)
|
||||
{
|
||||
int res;
|
||||
if (actEmpty) return res;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue