Skip to content

Commit

Permalink
Qualify some function parameters under std.conv as const to reduce te…
Browse files Browse the repository at this point in the history
…mplate bloat
  • Loading branch information
nordlow committed Sep 23, 2021
1 parent 46d416f commit b2129a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions std/conv.d
Original file line number Diff line number Diff line change
Expand Up @@ -4735,15 +4735,15 @@ package template WideElementType(T)
* Convenience functions for converting one or more arguments
* of any type into _text (the three character widths).
*/
string text(T...)(T args)
string text(T...)(const(T) args)
if (T.length > 0) { return textImpl!string(args); }

///ditto
wstring wtext(T...)(T args)
wstring wtext(T...)(const(T) args)
if (T.length > 0) { return textImpl!wstring(args); }

///ditto
dstring dtext(T...)(T args)
dstring dtext(T...)(const(T) args)
if (T.length > 0) { return textImpl!dstring(args); }

///
Expand Down Expand Up @@ -4773,7 +4773,7 @@ if (T.length > 0) { return textImpl!dstring(args); }
assert(dtext(cs, ' ', ws, " ", ds) == "今日は 여보세요 Здравствуйте"d);
}

private S textImpl(S, U...)(U args)
private S textImpl(S, U...)(const(U) args)
{
static if (U.length == 0)
{
Expand Down

0 comments on commit b2129a0

Please sign in to comment.