Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions specs/language/conversions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
\p If the glvalue refers to an array of type \texttt{T}, the prvalue will refer
to a copy of the array, not memory referred to by the glvalue.

\p If the glvalue refers to a bit-field of type \texttt{T}, the conversion
produces an object of the underlying type of the bit-field.

\Sec{Array-to-pointer conversion}{Conv.array}

\p An lvalue or rvalue of type \texttt{T[]} (unsized array), can be converted to
Expand Down Expand Up @@ -118,6 +121,17 @@
of boolean type. A zero value is converted to \texttt{false}; all other values
are converted to \texttt{true}.

\Sec{Bit-field conversion}{Conv.bitfield}

\p A glvalue of a named bit-field with underlying type \texttt{T} can be converted
to a cxvalue of type \texttt{T$^\prime$} if there exists an implicit conversion
from \texttt{T} to \texttt{T$^\prime$}.

\p A glvalue or a prvalue of a type \texttt{T} can be converted to a glvalue
of a named bit-field of type \texttt{T$^\prime$} if there exists an implicit
conversion from \texttt{T} to \texttt{T$^\prime$}. After the conversion from
\texttt{T} to \texttt{T$^\prime$} the value is truncated to the size of the bit-field.

\Sec{Elementwise conversion}{Conv.flat}

\p For a given aggregate \texttt{A}, there is a flattened order of subojects, \texttt{A$^\prime$},
Expand Down