Skip to content

Commit

Permalink
Merge pull request #6561 from WalterBright/stdio-scope
Browse files Browse the repository at this point in the history
all put() functions should have 'scope' parameters
merged-on-behalf-of: Walter Bright <[email protected]>
  • Loading branch information
dlang-bot authored Jun 9, 2018
2 parents 790d082 + 433d318 commit 9cecdb8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions std/stdio.d
Original file line number Diff line number Diff line change
Expand Up @@ -2900,7 +2900,7 @@ is empty, throws an `Exception`. In case of an I/O error throws
}

/// ditto
void put(C)(C c) @safe if (isSomeChar!C || is(C : const(ubyte)))
void put(C)(scope C c) @safe if (isSomeChar!C || is(C : const(ubyte)))
{
import std.traits : Parameters;
static auto trustedFPUTC(int ch, _iobuf* h) @trusted
Expand Down Expand Up @@ -3127,14 +3127,14 @@ is empty, throws an `Exception`. In case of an I/O error throws
}
}

void put(T)(auto ref in T value)
void put(T)(auto ref scope const T value)
if (!hasIndirections!T &&
!isInputRange!T)
{
rawWrite((&value)[0 .. 1]);
}

void put(T)(in T[] array)
void put(T)(scope const(T)[] array)
if (!hasIndirections!T &&
!isInputRange!T)
{
Expand Down

0 comments on commit 9cecdb8

Please sign in to comment.