Skip to content

Commit

Permalink
Add missing imports
Browse files Browse the repository at this point in the history
  • Loading branch information
monarchdodra committed Mar 12, 2014
1 parent 1fa56c6 commit 468d57e
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions std/range.d
Expand Up @@ -576,11 +576,15 @@ package void doPut(R, E)(ref R r, auto ref E e)
r.front = e;
r.popFront();
}
else static if (is(typeof(r(e))))
{
r(e);
}
else
{
static assert(is(typeof(r(e))),
import std.string;
static assert (false,
format("Cannot nativaly put a %s into a %s.", E.stringof, R.stringof));
r(e);
}
}

Expand Down Expand Up @@ -696,7 +700,10 @@ void put(R, E)(ref R r, E e)
}
}
else
{
import std.string;
static assert (false, format("Cannot put a %s into a %s.", E.stringof, R.stringof));
}
}

//Helper function to handle chars as quickly and as elegantly as possible
Expand Down Expand Up @@ -743,7 +750,10 @@ if (isSomeChar!E)
encode!(C, R)(e, r);
}
else
{
import std.string;
static assert (false, format("Cannot put a %s into a %s.", E.stringof, R.stringof));
}
}

pure unittest
Expand Down

0 comments on commit 468d57e

Please sign in to comment.