From 860c7005b1882980d90fdf69bdb5e57a726033ea Mon Sep 17 00:00:00 2001 From: languagelawyer Date: Sat, 8 Jan 2022 02:24:02 +0300 Subject: [PATCH] [basic.lookup.unqual] Clarify conversion-function-id components lookup --- source/basic.tex | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/source/basic.tex b/source/basic.tex index 90685d5eea..bfa77bccf2 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -1777,13 +1777,15 @@ such a name undergoes unqualified name lookup from the point where it appears. \pnum -An unqualified name that is a component name\iref{expr.prim.id.unqual} of +Lookup for an unqualified name $U$ +that is a component name\iref{expr.prim.id.unqual} of a \grammarterm{type-specifier} or \grammarterm{ptr-operator} of -a \grammarterm{conversion-type-id} is looked up in the same fashion -as the \grammarterm{conversion-function-id} in which it appears. -If that lookup finds nothing, it undergoes unqualified name lookup; -in each case, only names -that denote types or templates whose specializations are types are considered. +a \grammarterm{conversion-type-id} $T$ considers only names +that denote types or templates whose specializations are types. +If $T$ appears in a \grammarterm{conversion-function-id} that is a qualified name +whose lookup context\iref{basic.lookup.qual} is a class $S$, +lookup for $U$ performs a search in the scope associated with $S$; +if that lookup finds nothing, $U$ undergoes unqualified name lookup. \begin{example} \begin{codeblock} struct T1 { struct U { int i; }; };