From 958dcf14bd15ff6856c52944973d4432f14597a1 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Wed, 18 Jun 2025 10:04:59 +0800 Subject: [PATCH 1/7] [dcl.constexpr], [dcl.init.aggr] A constructor is a member function --- source/declarations.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/declarations.tex b/source/declarations.tex index 341c1bc1f3..d451d6b206 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -937,7 +937,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 @@ -5491,7 +5491,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 From deb16d9d35ab3d5d4021078e9e8003216c0bfbb3 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Wed, 18 Jun 2025 10:08:50 +0800 Subject: [PATCH 2/7] [expr.call], [expr.const] A constructor is a (member) function --- source/expressions.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/expressions.tex b/source/expressions.tex index 51ff9a3ce5..5f225c835e 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -3764,7 +3764,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} @@ -3793,7 +3793,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. @@ -9155,7 +9155,7 @@ in an immediate-escalating function. \pnum -An \defnadj{immediate}{function} is a function or constructor that is either +An \defnadj{immediate}{function} is a function that is either \begin{itemize} \item declared with the \keyword{consteval} specifier, or From e5ed21fbb57ed8b04e62bf37c020b5c6ddbc20c9 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Wed, 18 Jun 2025 10:11:23 +0800 Subject: [PATCH 3/7] [temp.spec.general], [temp.inst] A member function is a function --- source/templates.tex | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source/templates.tex b/source/templates.tex index 9ef3133aef..2c959a96b1 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -6395,10 +6395,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 struct A { @@ -6766,7 +6764,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}. From 6ccc29261a8616dc63cc66c84d3d57adeee80c5d Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Wed, 18 Jun 2025 10:12:09 +0800 Subject: [PATCH 4/7] [constexpr.functions] A constructor is a function --- source/lib-intro.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 7d6d3012ff..48b6a6ef3f 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -3750,7 +3750,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} From 333cad0c186b27d97caf6773a4d3858d5e6f9ea6 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Wed, 18 Jun 2025 10:12:51 +0800 Subject: [PATCH 5/7] [pairs.pair] A constructor is a member function --- source/utilities.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/utilities.tex b/source/utilities.tex index 0a26e0266a..716f266bcf 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -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. From ad8ce344ee8332303701835a6768b96f7d386453 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Wed, 18 Jun 2025 10:15:49 +0800 Subject: [PATCH 6/7] [container.reqmts], [flat.map.overview], [flat.multimap.overview], [flat.set.overview], [flat.multiset.overview] A constructor is a member function --- source/containers.tex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 6a71104dd1..b3f31cda67 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -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 @@ -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 @@ -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. @@ -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. @@ -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. From bfa24db1a6a714f50f070ae046a6a15470932d34 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Wed, 18 Jun 2025 10:20:07 +0800 Subject: [PATCH 7/7] [diff.cpp17.depr] A constructor is a member function --- source/compatibility.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/compatibility.tex b/source/compatibility.tex index a46c9a71cc..3e0614222e 100644 --- a/source/compatibility.tex +++ b/source/compatibility.tex @@ -1578,7 +1578,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.