Skip to content

Commit f2b9a99

Browse files
authored
Revert "Use const parameters in mir.format to reduce template bloat" (#364)
* Revert "Use const parameters in mir.format to reduce template bloat (#359)" This reverts commit 9a6abda. * add test
1 parent 407757b commit f2b9a99

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

source/mir/format.d

+3-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ unittest
6060
}
6161

6262
/// Concatenated string results
63-
string text(string separator = "", Args...)(auto ref const(Args) args)
63+
string text(string separator = "", Args...)(auto ref Args args)
6464
if (Args.length > 0)
6565
{
6666
static if (Args.length == 1)
@@ -88,7 +88,8 @@ string text(string separator = "", Args...)(auto ref const(Args) args)
8888
///
8989
@safe pure nothrow unittest
9090
{
91-
assert(text("str ", true, " ", 100, " ", 124.1) == "str true 100 124.1", text("str ", true, " ", 100, " ", 124.1));
91+
const i = 100;
92+
assert(text("str ", true, " ", i, " ", 124.1) == "str true 100 124.1", text("str ", true, " ", 100, " ", 124.1));
9293
assert(text!" "("str", true, 100, 124.1) == "str true 100 124.1");
9394
}
9495

0 commit comments

Comments
 (0)