Skip to content

Commit 24bb2a0

Browse files
jensmaurerzygoloid
authored andcommitted
[std] Consistently use 'overload set'.
Define the term in [basic.lookup] and use it throughout. Avoid the term 'set of overloaded functions', because it is ambiguous with the declaration view in [over.load]. (An overload set might contain functions from different scopes that cannot be overloaded per [over.load].)
1 parent 54dc015 commit 24bb2a0

File tree

5 files changed

+26
-27
lines changed

5 files changed

+26
-27
lines changed

source/basic.tex

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,8 @@
351351
\begin{itemize}
352352
\item
353353
A function is named by an expression or conversion
354-
if it is the unique result of a name lookup or the selected member
355-
of a set of overloaded functions~(\ref{basic.lookup}, \ref{over.match}, \ref{over.over})
354+
if it is the selected member
355+
of an overload set~(\ref{basic.lookup}, \ref{over.match}, \ref{over.over})
356356
in an overload resolution performed
357357
as part of forming that expression or conversion,
358358
unless it is a pure virtual function and either
@@ -1365,11 +1365,12 @@
13651365
such names in the context discussed by a particular rule. Name lookup
13661366
associates the use of a name with a set of declarations\iref{basic.def} of
13671367
that name.
1368-
The declarations found by name lookup shall either all denote the same entity or
1369-
shall all denote functions or function templates;
1370-
in the latter case,
1371-
the declarations are said to form a set of overloaded
1372-
functions\iref{over.load}. Overload resolution\iref{over.match}
1368+
If the declarations found by name lookup
1369+
all denote functions or function templates,
1370+
the declarations are said to form an \defn{overload set}.
1371+
The declarations found by name lookup shall either
1372+
all denote the same entity or form an overload set.
1373+
Overload resolution~(\ref{over.match}, \ref{over.over})
13731374
takes place after name lookup has succeeded. The access rules\iref{class.access}
13741375
are considered only once name lookup and
13751376
function overload resolution (if applicable) have succeeded. Only after
@@ -1846,12 +1847,12 @@
18461847
enclosing namespace is also included in the set. If an associated namespace
18471848
directly contains inline namespaces, those inline namespaces are also included
18481849
in the set.
1849-
In addition, if the argument is the name or address of a set of
1850-
overloaded functions and/or function templates, its associated entities
1850+
In addition, if the argument is the name or address of an overload set,
1851+
its associated entities
18511852
and namespaces are the union of those associated with each of the
18521853
members of the set, i.e., the entities and namespaces associated with its
18531854
parameter types and return type.
1854-
Additionally, if the aforementioned set of overloaded functions is named with
1855+
Additionally, if the aforementioned overload set is named with
18551856
a \grammarterm{template-id}, its associated entities and namespaces also include
18561857
those of its type \grammarterm{template-argument}{s} and its template
18571858
\grammarterm{template-argument}{s}.

source/declarations.tex

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,7 @@
421421
The linkages implied by successive declarations for a given entity shall
422422
agree. That is, within a given scope, each declaration declaring the
423423
same variable name or the same overloading of a function name shall imply
424-
the same linkage. Each function in a given set of overloaded functions
425-
can have a different linkage, however.
424+
the same linkage.
426425
\begin{example}
427426
\begin{codeblock}
428427
static char* f(); // \tcode{f()} has internal linkage

source/expressions.tex

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2955,8 +2955,7 @@
29552955
initialized~(\ref{dcl.init}, \ref{class.copy.ctor}) with
29562956
its corresponding argument.
29572957
If there is no corresponding argument,
2958-
the default argument for the parameter is used;
2959-
the program is ill-formed if one is not present.
2958+
the default argument for the parameter is used.
29602959
\begin{example}
29612960
\begin{codeblock}
29622961
template<typename ...T> int f(int n = 0, T ...t);

source/overloading.tex

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@
653653
and non-template functions\iref{dcl.fct} are treated equivalently
654654
for the remainder of overload resolution.}
655655
A given name can refer to one or more function templates and also
656-
to a set of overloaded non-template functions.
656+
to a set of non-template functions.
657657
In such a case, the
658658
candidate functions generated from each function template are combined
659659
with the set of non-template candidate functions.
@@ -700,16 +700,17 @@
700700
\begin{ncsimplebnf}
701701
postfix-expression \terminal{(} \opt{expression-list} \terminal{)}
702702
\end{ncsimplebnf}
703-
if the \grammarterm{postfix-expression} denotes a set of overloaded functions and/or
704-
function templates, overload resolution is applied as specified in \ref{over.call.func}.
703+
if the \grammarterm{postfix-expression} names at least one function or
704+
function template,
705+
overload resolution is applied as specified in \ref{over.call.func}.
705706
If the \grammarterm{postfix-expression} denotes an object of class type, overload
706707
resolution is applied as specified in \ref{over.call.object}.
707708

708709
\pnum
709-
If the \grammarterm{postfix-expression} denotes the address of a set of overloaded
710-
functions and/or function templates, overload resolution is applied using that set as
711-
described above. If the function selected by overload resolution is a non-static member
712-
function, the program is ill-formed.
710+
If the \grammarterm{postfix-expression} is the address of an overload set,
711+
overload resolution is applied using that set as described above.
712+
If the function selected by overload resolution is a non-static member function,
713+
the program is ill-formed.
713714
\begin{note}
714715
The resolution of the address of an
715716
overload set in other contexts is described in \ref{over.over}.

source/templates.tex

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,8 +1204,8 @@
12041204
of the type of the \grammarterm{template-parameter}.
12051205
\begin{note}
12061206
If the \grammarterm{template-argument}
1207-
represents a set of overloaded functions
1208-
(or a pointer or member pointer to such),
1207+
is an overload set
1208+
(or the address of such, including forming a pointer-to-member),
12091209
the matching function is selected from the set\iref{over.over}.
12101210
\end{note}
12111211

@@ -8368,17 +8368,16 @@
83688368
has a default argument that is being used in the call for which argument
83698369
deduction is being done.
83708370
\item
8371-
A function parameter for which argument deduction cannot be done because the
8372-
associated function argument is a function, or a set of overloaded
8373-
functions\iref{over.over}, and one or more of the following apply:
8371+
A function parameter for which the associated argument is an
8372+
overload set\iref{over.over}, and one or more of the following apply:
83748373
\begin{itemize}
83758374
\item
83768375
more than one function matches the function parameter type (resulting in
83778376
an ambiguous deduction), or
83788377
\item
83798378
no function matches the function parameter type, or
83808379
\item
8381-
the set of functions supplied as an argument contains one or more function templates.
8380+
the overload set supplied as an argument contains one or more function templates.
83828381
\end{itemize}
83838382
\item A function parameter for which the associated argument is an initializer
83848383
list\iref{dcl.init.list} but the parameter does not have

0 commit comments

Comments
 (0)