Skip to content

Clarify functions, member functions, and constructors #6946

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
2 changes: 1 addition & 1 deletion source/compatibility.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1511,7 +1511,7 @@
Remove deprecated type traits.
\rationale
The traits had unreliable or awkward interfaces. The \tcode{is_literal_type}
trait provided no way to detect which subset of constructors and member
trait provided no way to detect which subset of member
functions of a type were declared \keyword{constexpr}. The \tcode{result_of}
trait had a surprising syntax that did not directly support function types.
It has been superseded by the \tcode{invoke_result} trait.
Expand Down
10 changes: 5 additions & 5 deletions source/containers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@
allocator argument, then the allocator type must support value-initialization.
\end{note}
A copy of this allocator is used for any memory allocation and element construction
performed, by these constructors and by all member functions,
performed, by these constructors and by all other member functions,
during the lifetime of each container object
or until the allocator is replaced. The allocator may be replaced only via assignment or
\tcode{swap()}. Allocator replacement is performed by
Expand Down Expand Up @@ -17058,7 +17058,7 @@
containers of different sizes is undefined.

\pnum
The effect of calling a constructor or member function
The effect of calling a member function
that takes a \tcode{sorted_unique_t} argument with
a container, containers, or range
that is not sorted with respect to \tcode{key_comp()}, or
Expand Down Expand Up @@ -18255,7 +18255,7 @@
with containers of different sizes is undefined.

\pnum
The effect of calling a constructor or member function
The effect of calling a member function
that takes a \tcode{sorted_equivalent_t} argument
with a container, containers, or range
that are not sorted with respect to \tcode{key_comp()} is undefined.
Expand Down Expand Up @@ -18887,7 +18887,7 @@
as \tcode{KeyContainer::value_type}.

\pnum
The effect of calling a constructor or member function
The effect of calling a member function
that takes a \tcode{sorted_unique_t} argument
with a range that is not sorted with respect to \tcode{key_comp()}, or
that contains equal elements, is undefined.
Expand Down Expand Up @@ -19557,7 +19557,7 @@
as \tcode{KeyContainer::value_type}.

\pnum
The effect of calling a constructor or member function
The effect of calling a member function
that takes a \tcode{sorted_equivalent_t} argument with a range
that is not sorted with respect to \tcode{key_comp()} is undefined.

Expand Down
4 changes: 2 additions & 2 deletions source/declarations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@
declares that function to be
a \defnx{constexpr function}{specifier!\idxcode{constexpr}!function}.
\begin{note}
A function or constructor declared with the \keyword{consteval} specifier
A function declared with the \keyword{consteval} specifier
is an immediate function\iref{expr.const}.
\end{note}
A destructor, an allocation function, or a deallocation function
Expand Down Expand Up @@ -5372,7 +5372,7 @@
\end{itemize}
\begin{note}
Aggregate initialization does not allow accessing
protected and private base class' members or constructors.
protected and private base class' members, including constructors.
\end{note}

\pnum
Expand Down
6 changes: 3 additions & 3 deletions source/expressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3535,7 +3535,7 @@
\grammarterm{initializer-clause}{s} which
constitute the arguments to the function.
\begin{note}
If the postfix expression is a function or member function name,
If the postfix expression is a function name,
the appropriate function and the validity of the call
are determined according to the rules in~\ref{over.match}.
\end{note}
Expand Down Expand Up @@ -3564,7 +3564,7 @@

\pnum
\begin{note}
If a function or member function name is used, and name
If a function name is used, and name
lookup\iref{basic.lookup} does not find a declaration of that name,
the program is ill-formed. No function is implicitly declared by such a
call.
Expand Down Expand Up @@ -8601,7 +8601,7 @@
in an immediate-escalating function.

\pnum
An \defnadj{immediate}{function} is a function or constructor that is
An \defnadj{immediate}{function} is a function that is
\begin{itemize}
\item
declared with the \keyword{consteval} specifier, or
Expand Down
2 changes: 1 addition & 1 deletion source/lib-intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3732,7 +3732,7 @@
any standard library function signature as \keyword{constexpr} except for those where
it is explicitly required.
Within any header that provides any non-defining declarations of constexpr
functions or constructors an implementation shall provide corresponding definitions.
functions an implementation shall provide corresponding definitions.

\rSec3[algorithm.stable]{Requirements for stable algorithms}

Expand Down
8 changes: 3 additions & 5 deletions source/templates.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6184,10 +6184,8 @@
a member of a class template, or a class member template,
the variable or class that is explicitly specialized
shall be specified with a \grammarterm{simple-template-id}.
In the explicit specialization declaration for a function template or
a member function template,
the function or member function explicitly specialized may be specified
using a \grammarterm{template-id}.
In the explicit specialization declaration for a function template,
the function explicitly specialized may be specified using a \grammarterm{template-id}.
\begin{example}
\begin{codeblock}
template<class T = int> struct A {
Expand Down Expand Up @@ -6555,7 +6553,7 @@
\end{example}

\pnum
If a function template or a member function template specialization is used in
If a function template specialization is used in
a way that involves overload resolution,
a declaration of the specialization is implicitly instantiated\iref{temp.over}.

Expand Down
2 changes: 1 addition & 1 deletion source/utilities.tex
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@
\end{codeblock}

\pnum
Constructors and member functions of \tcode{pair} do not throw exceptions unless one of
Member functions of \tcode{pair} do not throw exceptions unless one of
the element-wise operations specified to be called for that operation
throws an exception.

Expand Down