Skip to content

Commit 18d159a

Browse files
schveiguydlang-bot
authored andcommitted
Identify template this functions detect mutability
of the this parameter
1 parent 10de19b commit 18d159a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spec/template.dd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,9 @@ $(GNAME TemplateThisParameter):
356356
)
357357

358358
$(P $(I TemplateThisParameter)s are used in member function templates
359-
to pick up the type of the $(I this) reference.)
359+
to pick up the type of the $(I this) reference. It also will
360+
infer the mutability of the `this` reference. For example, if
361+
`this` is `const`, then the function is marked `const`.)
360362

361363
---
362364
import std.stdio;

0 commit comments

Comments
 (0)