Date: Mon, 11 Nov 2024 16:16:36 +0200
Ville Voutilainen wrote:
> It is how language works for everything else, but not for overload sets.
> And even for overload sets, once the listing-query is for accessible members,
> the dependency to a private implementation detail can't be formed.
I don't understand these statements. Overload resolution is performed
before access checking.
https://godbolt.org/z/x41erqKh9
The overload set here contains both `f` functions, even though one is
inaccessible; overload resolution is performed over this entire set, and
then, after the best viable function is selected, its accessibility is checked.
> It is how language works for everything else, but not for overload sets.
> And even for overload sets, once the listing-query is for accessible members,
> the dependency to a private implementation detail can't be formed.
I don't understand these statements. Overload resolution is performed
before access checking.
https://godbolt.org/z/x41erqKh9
The overload set here contains both `f` functions, even though one is
inaccessible; overload resolution is performed over this entire set, and
then, after the best viable function is selected, its accessibility is checked.
Received on 2024-11-11 14:16:43