Skip to content

Commit

Permalink
Put spaces in correct locations of overloaded constructor call
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Nov 3, 2020
1 parent f3f428d commit b235410
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions chapters/overloaded.tex
Original file line number Diff line number Diff line change
Expand Up @@ -106,20 +106,16 @@ \section{Matching Function}\label{matching-function}
\section{Overloaded Constructors}\label{overloaded-constructors}

Let \lstinline!C! denote an operator record class and consider an expression
\lstinline!C($A_1$, $a_{2}$, $\ldots$, $a_{k}$, $b_{1}$ = $w_{1}$, $\ldots$, $b_{p}$ = $w_{p}$)!.
\lstinline!C($A_1$, $a_{2}$, $\ldots$, $a_{k}$, $b_{1}$=$w_{1}$, $\ldots$, $b_{p}$=$w_{p}$)!.

\begin{enumerate}
\item\label{overloaded-constructor-unique}
If there exists a unique function $f$ in \lstinline!C.'constructor'! such that
($A_1$, $a_{2}$,\ldots{}, $a_{k}$,
$b_{1}$= $w_{1}$ ,\ldots{}, $b_{p}$=
$w_{p}$) is a valid match for the function $f$, then
C($A_1$, $a_{2}$,\ldots{}, $a_{k}$,
$b_{1}$= $w_{1}$ ,\ldots{}, $b_{p}$=
$w_{p}$) is resolved to\\
C.'constructor'.f($A_1$, $a_{2}$,\ldots{},
$a_{k}$, $b_{1}$= $w_{1}$ ,\ldots{},
$b_{p}$= $w_{p}$).
($A_1$, $a_{2}$, \ldots{}, $a_{k}$, $b_{1}$=$w_{1}$, \ldots{}, $b_{p}$=$w_{p}$)
is a valid match for the function $f$, then
\lstinline!C($A_1$, $a_{2}$, $\ldots$, $a_{k}$, $b_{1}$=$w_{1}$, $\ldots$, $b_{p}$=$w_{p}$)!
is resolved to
\lstinline!C.'constructor'.$f$($A_1$, $a_{2}$, $\ldots$, $a_{k}$, $b_{1}$=$w_{1}$, $\ldots$, $b_{p}$=$w_{p}$)!.
\item
If there is no operator \lstinline!C.'constructor'! the automatically generated record constructor is called.
\item
Expand Down

0 comments on commit b235410

Please sign in to comment.