Skip to content

Commit

Permalink
Update function.dd
Browse files Browse the repository at this point in the history
Replaced a hard to decipher sentence and added a comment for Uniform Function Call Syntax.
  • Loading branch information
ralphtandetzky committed Dec 12, 2013
1 parent 511ef20 commit 4655f1d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions function.dd
Expand Up @@ -697,7 +697,7 @@ void test() {


$(P Functions defined with non-D linkage cannot be overloaded.
This is because the name mangling might not take the parameter types
because the name mangling does not take the parameter types
into account.
)

Expand Down Expand Up @@ -1845,8 +1845,9 @@ $(H3 $(LNAME2 function-attribute-inference, Function Attribute Inference))

$(H3 $(LNAME2 pseudo-member, Uniform Function Call Syntax (UFCS)))

$(P D has the ability to replace the access for not present member
to the free function call.)
$(P A free function can be called with a syntax that looks as if the function
were a member function of its first parameter type.
)

---
void func(X thisObj);
Expand All @@ -1857,6 +1858,10 @@ $(H3 $(LNAME2 pseudo-member, Uniform Function Call Syntax (UFCS)))
// it's automatically rewritten to 'func(obj)'
---

$(P This provides a way to add functions to a class
externally as if they were public final member functions.
)

$(P It also works with $(D @property) functions:)

---
Expand Down

0 comments on commit 4655f1d

Please sign in to comment.