Skip to content

Rebased version of CWG Poll 5: P1787R6 Declarations and where to find them #4398

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

Merged
merged 6 commits into from
Dec 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2,699 changes: 1,273 additions & 1,426 deletions source/basic.tex

Large diffs are not rendered by default.

1,101 changes: 303 additions & 798 deletions source/classes.tex

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion source/compatibility.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1910,6 +1910,14 @@
\diffref{basic.scope}
\change
A \tcode{struct} is a scope in \Cpp{}, not in C.
For example,
\begin{codeblock}
struct X {
struct Y { int a; } b;
};
struct Y c;
\end{codeblock}
is valid in C but not in \Cpp{}, which would require \tcode{X::Y c;}.
\rationale
Class scope is crucial to \Cpp{}, and a struct is a class.
\effect
Expand Down Expand Up @@ -2603,7 +2611,7 @@
\howwide
Seldom.

\diffref{class.nested.type}
\diffref{class.member.lookup}
\change
In \Cpp{}, a typedef name may not be redeclared in a class definition after being used in that definition.

Expand Down
17 changes: 8 additions & 9 deletions source/concepts.tex
Original file line number Diff line number Diff line change
Expand Up @@ -867,15 +867,14 @@
\begin{itemize}
\item
either \tcode{remove_cvref_t<T>} is not a class type, or
name lookup for the names \tcode{operator\&\&} and \tcode{operator||}
within the scope of \tcode{remove_cvref_t<T>}
as if by class member access lookup\iref{class.member.lookup}
results in an empty declaration set; and
a search for the names \tcode{operator\&\&} and \tcode{operator||}
in the scope of \tcode{remove_cvref_t<T>}
finds nothing; and

\item
name lookup for the names \tcode{operator\&\&} and \tcode{operator||} in
the associated namespaces and
entities of \tcode{T}\iref{basic.lookup.argdep}
argument-dependent lookup\iref{basic.lookup.argdep}
for the names \tcode{operator\&\&} and \tcode{operator||}
with \tcode{T} as the only argument type
finds no disqualifying declaration (defined below).
\end{itemize}

Expand Down Expand Up @@ -942,8 +941,8 @@
\begin{itemize}
\item at least one disqualifying parameter is a key parameter; or
\item the declaration contains no key parameters; or
\item the declaration declares a function template that
is not visible in its namespace\iref{namespace.memdef}.
\item the declaration declares a function template
to which no name is bound\iref{dcl.meaning}.
\end{itemize}
\end{itemize}

Expand Down
Loading