c++/7522: access by friend function's default argument
bangerth@dealii.org
bangerth@dealii.org
Wed Oct 30 15:35:00 GMT 2002
Synopsis: access by friend function's default argument
State-Changed-From-To: open->feedback
State-Changed-By: bangerth
State-Changed-When: Wed Oct 30 15:32:03 2002
State-Changed-Why:
I don't think this is a bug. 11.0.7 states:
7 The names in a default argument expression (_dcl.fct.default_) are
bound at the point of declaration, and access is checked at that point
rather than at any points of use of the default argument expression.
I don't see anything right away in the standard that for
checking access to the names used in the default value has
to happen inside the scope of the function that uses them,
but common reasoning would suggest that the enclosing scope
is used, in which case the befriended function is not
taken into account.
I'll put this report into feedback mode. Please let us know
if you can follow my reasoning, or whether we shall reopen
the report.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7522
More information about the Gcc-bugs
mailing list