Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qualify some function parameters under std.conv as const to reduce te… #8251

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions std/conv.d
Original file line number Diff line number Diff line change
Expand Up @@ -4796,15 +4796,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 @@ -4834,7 +4834,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
Loading