C++ Logo

sg7

Advanced search

Re: [isocpp-sg7] SG7 late paper P3493R0 - Ruminations on reflection and access

From: Peter Dimov <pdimov_at_[hidden]>
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.

Received on 2024-11-11 14:16:43