Unless otherwise specified,
the program is ill-formed if no declarations are found
. If the declarations found by name lookup
all denote functions or function templates,
the declarations are said to form an
overload set. Otherwise,
if the declarations found by name lookup do not all denote the same entity,
they are
ambiguous and the program is ill-formed
. The access rules (
[class.access])
are considered only once name lookup and
function overload resolution (if applicable) have succeeded
. Only after
name lookup, function overload resolution (if applicable) and access
checking have succeeded
are the semantic properties introduced by the declarations
used in further processing
.