[Bug c++/87571] [8/9 Regression] ICE in friend_accessible_p, accessing protected member of template friend inside template class
aoliva at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 28 07:53:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87571
Alexandre Oliva <aoliva at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-11-28
CC| |aoliva at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
The reason private works where protected doesn't is that private access
checking uses is_friend, whereas protected access checking uses
friend_accessible_p. The latter is supposed to grant access whenever is_friend
would (that's the assert that fails), but while is_friend checks various
possibilities of template specialization with is_specialization_of_friend,
friend_accessible_p seems to only handle one layer of template friends.
I'm afraid I don't quite see how to extend e.g. protected_accessible_p, used by
friend_accessible_p, to deal with additional template layers.
More information about the Gcc-bugs
mailing list