Skip to content

Commit 33428bf

Browse files
committed
spec: class: add __ctor, __dtor and __xdtor aliases
Signed-off-by: Luís Ferreira <[email protected]>
1 parent 46a5e83 commit 33428bf

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

glossary.dd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,11 @@ void test()
258258
syntax) refers to the ability to call a function as if it were a method of
259259
its first argument. For example `funct(arg)` may be written as
260260
`arg.funct()`.)
261+
262+
$(DT $(LNAME2 inclusive_destructor, inclusive-destructor, Inclusive
263+
Destructor))
264+
$(DD An inclusive destructor is a destructor that includes destruction
265+
of the object itself and its fields, if reaching its lifetime.)
261266
)
262267

263268
)

spec/class.dd

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,9 @@ $(GNAME Constructor):
371371
}
372372
------
373373

374+
$(P The compiler generate a $(D __ctor) alias that matches with
375+
constructors definitions.)
376+
374377
$(H3 $(LNAME2 delegating-constructors, Delegating Constructors))
375378

376379
$(P A constructor can call another constructor for the same class
@@ -729,6 +732,11 @@ $(GNAME Destructor):
729732
by the gc.
730733
)
731734

735+
$(P The compiler generates $(D __dtor) and $(D __xdtor) aliases that
736+
matches the class destructor definition and inclusive destructors,
737+
respectively.)
738+
739+
732740
$(H2 $(LNAME2 static-constructor, Static Constructors))
733741

734742
$(GRAMMAR

0 commit comments

Comments
 (0)