File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ is possible in the D programming language using a delegate parameter:
9595)
9696
9797---
98- void log(string delegate() dg)
98+ void log(const(char)[] delegate() dg)
9999{
100100 if (logging)
101101 fwritefln(logfile, dg());
@@ -123,7 +123,7 @@ The functions then become:
123123)
124124
125125---
126- void log(lazy string dg)
126+ void log(lazy const(char)[] dg)
127127{
128128 if (logging)
129129 fwritefln(logfile, dg());
@@ -260,7 +260,7 @@ function:
260260)
261261
262262---
263- Abc Enforce(Abc p, lazy string msg)
263+ Abc Enforce(Abc p, lazy const(char)[] msg)
264264{
265265 if (!p)
266266 throw new Exception(msg());
@@ -280,7 +280,7 @@ template function:
280280)
281281
282282---
283- T Enforce(T)(T p, lazy string msg)
283+ T Enforce(T)(T p, lazy const(char)[] msg)
284284{
285285 if (!p)
286286 throw new Exception(msg());
You can’t perform that action at this time.
0 commit comments