doc/concepts.tex: Delete `no way to discover alignment for instance' claim.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 3 Aug 2019 15:47:15 +0000 (16:47 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 3 Aug 2019 15:47:15 +0000 (16:47 +0100)
Replace with a reference to the `align' class slot.

doc/concepts.tex

index eae67aa..67dc35b 100644 (file)
@@ -940,7 +940,8 @@ layout of an instance of some class~$C$ is described by the type @|struct
 $C$__ilayout|, and if the relevant class is known at compile time then the
 best way to discover the layout size is with the @|sizeof| operator.  Failing
 that, the size required to hold an instance of $C$ is available in a slot in
-$C$'s class object, as @|$C$__class@->cls.initsz|.
+$C$'s class object, as @|$C$__class@->cls.initsz|.  The necessary alignment,
+in bytes, is provided as @|$C$__class@->cls.align|, should this be necessary.
 
 It is not in general sufficient to declare, or otherwise allocate, an object
 of the class type $C$.  The class type only describes a single chain of the
@@ -956,10 +957,6 @@ instances, so, for example, Sod doesn't make using fancy allocators which
 sometimes move objects around in memory any more difficult than it needs to
 be.
 
-There isn't any way to discover the alignment required for a particular
-class's instances at runtime; it's best to be conservative and assume that
-the platform's strictest alignment requirement applies.
-
 The following simple function correctly allocates and returns space for an
 instance of a class given a pointer to its class object @<cls>.
 \begin{prog}