Skip to content

Commit 7c10ca4

Browse files
authored
A few fixups
1 parent 3e7965e commit 7c10ca4

File tree

1 file changed

+19
-20
lines changed

1 file changed

+19
-20
lines changed

spec/struct.dd

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -567,26 +567,26 @@ $(GNAME Postblit):
567567
---
568568

569569
$(P Depending on the struct layout, the compiler may generate the following
570-
internal postblits:)
570+
internal postblit functions:)
571571

572572
$(OL
573-
$(LI `__postblit`. The compiler assigns this name to the explicitly
573+
$(LI `void __postblit()`. The compiler assigns this name to the explicitly
574574
defined postblit `this(this)` so that it can be treated exactly as
575575
a normal function. Note that if a struct defines a postblit, it cannot
576576
define a function named `__postblit` - no matter the signature -
577-
as this will result in a compilation error due to the name conflict.)
578-
$(LI `__fieldPostblit`. If a struct `X` has at least 1 member which is a
579-
struct that defines a postblit, then a field postblit is generated
580-
for `X` that calls all the underlying postblits of the struct fields
581-
in topological order.)
582-
$(LI `__aggrPostblit`. If a struct has an explicitly defined postblit
583-
and at least 1 struct member that has a postblit (any type of postblit)
577+
as this would result in a compilation error due to the name conflict.)
578+
$(LI `void __fieldPostblit()`. If a struct `X` has at least one `struct`
579+
member that in turn defines (explicitly or implicitly) a postblit, then a field
580+
postblit is generated for `X` that calls all the underlying postblits
581+
of the struct fields in declaration order.)
582+
$(LI `void __aggrPostblit()`. If a struct has an explicitly defined postblit
583+
and at least 1 struct member that has a postblit (explicit or implicit)
584584
an aggregated postblit is generated which calls `__fieldPostblit` first
585585
and then `__postblit`.)
586-
$(LI `__xpostblit`. The field and aggregated postblits, although generated
587-
for a struct, are not actual struct members. In order to be able to call
588-
them, the compiler internally creates an alias, called `__xpostblit` which
589-
is a member of the struct and which points to the generated postblit that
586+
$(LI `void __xpostblit()`. The field and aggregated postblits, although
587+
generated for a struct, are not actual struct members. In order to be able
588+
to call them, the compiler internally creates an alias, called `__xpostblit`
589+
which is a member of the struct and which points to the generated postblit that
590590
is the most inclusive.)
591591
)
592592

@@ -660,8 +660,8 @@ void main()
660660
---
661661
)
662662

663-
$(P Postblits are not overloadable. If 2 postblits are defined,
664-
even if the signatures differ, the compiler will assign the
663+
$(P Postblits are not overloadable. If two or more postblits are defined,
664+
even if the signatures differ, the compiler assigns the
665665
`__postblit` name to both and later issue a conflicting function
666666
name error:)
667667

@@ -673,14 +673,13 @@ struct X
673673
}
674674
---
675675

676-
$(P The following paragraph describes the behavior of the
677-
postblit in the presence of qualifiers:)
676+
$(P The following describes the behavior of the
677+
qualified postblit definitions:)
678678

679679
$(OL
680680
$(LI `const`. When a postblit is qualified with `const` as in
681-
$(D this(this) const;) or $(D const this(this);) the code is
682-
ill-formed. The postblit is succesfully called on `mutable`
683-
(due to the mutable to const implicit conversion), `const`
681+
$(D this(this) const;) or $(D const this(this);) then the postblit
682+
is succesfully called on mutable (unqualified), `const`,
684683
and `immutable` objects, but the postblit cannot modify the object
685684
because it regards it as `const`; hence `const` postblits are of
686685
limited usefulness. Example:)

0 commit comments

Comments
 (0)