Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
22546a3
CWG1621 Member initializers in anonymous unions
Nov 12, 2019
d14f1de
CWG2126 Lifetime-extended temporaries in constant expressions
Nov 12, 2019
f650aef
CWG2282 Consistency with mismatched aligned/non-over-aligned allocati…
Nov 12, 2019
00e8011
CWG2347 Passing short scoped enumerations to ellipsis
Nov 13, 2019
3daaf90
CWG2374 Overly permissive specification of enum direct-list-initializ…
Nov 13, 2019
9700b13
CWG2399 Unclear referent of “expression” in assignment-expression
Nov 13, 2019
ec29589
CWG2419 Loss of generality treating pointers to objects as one-elemen…
Nov 13, 2019
7e730f8
[basic.compound] [numeric.ops.midpoint] Unify terminology used to
zygoloid Nov 19, 2019
7c9d35d
CWG2422 Incorrect grammar for deduction-guide
Nov 13, 2019
501a10b
CWG2424 constexpr initialization requirements for variant members
Nov 13, 2019
b5fd3b9
CWG2426 Reference to destructor that cannot be invoked
Nov 13, 2019
2c7090e
CWG2427 Deprecation of volatile operands and unevaluated contexts
Nov 13, 2019
e1ed0cc
CWG2429 Initialization of thread_local variables referenced by lambdas
Nov 13, 2019
21f5dec
CWG2430 Completeness of return and parameter types of member functions
Nov 13, 2019
6d05c69
CWG2431 Full-expressions and temporaries bound to references
Nov 13, 2019
b7e6e5e
CWG2432 Return types for defaulted <=>
Nov 13, 2019
2140e55
CWG2433 Variable templates in the ODR
Nov 13, 2019
752c82b
CWG2437 Conversion of std::strong_ordering in a defaulted operator<=>
Nov 13, 2019
fd20a44
CWG2442 Incorrect requirement for default arguments
Nov 13, 2019
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
Next Next commit
CWG1621 Member initializers in anonymous unions
  • Loading branch information
Dawn Perchik authored and zygoloid committed Nov 19, 2019
commit 22546a30c175440036e9727b1e612b8b4b90d0e4
35 changes: 5 additions & 30 deletions source/classes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -944,8 +944,8 @@
access syntax~(\ref{expr.ref}, \ref{over.match.call}). A non-static
member function may also be called directly using the function call
syntax~(\ref{expr.call}, \ref{over.match.call}) from within
the body of a member function of its class or of a class derived from
its class.
its class or a class derived from its class, or
a member thereof, as described below.

\pnum
\indextext{member function!call undefined}%
Expand Down Expand Up @@ -973,14 +973,7 @@
If \tcode{C} is not \tcode{X} or a base class of \tcode{X}, the class
member access expression is ill-formed.
\end{note}
Similarly during name lookup, when an
\grammarterm{unqualified-id}\iref{expr.prim.id.unqual} used in the definition of a
member function for class \tcode{X} resolves to a static member,
an enumerator or a nested type of class \tcode{X} or of a base class of
\tcode{X}, the \grammarterm{unqualified-id} is transformed into a
\grammarterm{qualified-id}\iref{expr.prim.id.qual} in which the
\grammarterm{nested-name-specifier} names the class of the member function.
These transformations do not apply in the
This transformation does not apply in the
template definition context\iref{temp.dep.type}.
\begin{example}
\begin{codeblock}
Expand Down Expand Up @@ -2752,22 +2745,6 @@
\end{codeblock}
\end{example}

\pnum
If an \grammarterm{unqualified-id}\iref{expr.prim.id.unqual} is used in the
definition of a static member following the member's
\grammarterm{declarator-id}, and name lookup\iref{basic.lookup.unqual}
finds that the \grammarterm{unqualified-id} refers to a static
member, enumerator, or nested type of the member's class (or of a base
class of the member's class), the \grammarterm{unqualified-id} is
transformed into a \grammarterm{qualified-id} expression in which the
\grammarterm{nested-name-specifier} names the class scope from which the
member is referenced.
\begin{note}
See~\ref{expr.prim.id} for restrictions on the use of non-static data
members and non-static member functions.
\end{note}


\pnum
Static members obey the usual class member access rules\iref{class.access}.
When used in the declaration of a class
Expand Down Expand Up @@ -3273,10 +3250,8 @@
Each \grammarterm{member-declaration} in the \grammarterm{member-specification}
of an anonymous union shall either define a non-static data member or be a
\grammarterm{static_assert-declaration}.
\begin{note}
Nested types, anonymous unions, and functions cannot be declared within an anonymous
union.
\end{note}
Nested types, anonymous unions, and functions
shall not be declared within an anonymous union.
The names of the members of an anonymous union shall be distinct from
the names of any other entity in the scope in which the anonymous union
is declared. For the purpose of name lookup, after the anonymous union
Expand Down