You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Otherwise, the terminal name of E is not looked up. The declaration's target scope is the innermost enclosing namespace scope; if the declaration is contained by a block scope, the declaration shall correspond to a declaration that inhabits the innermost block scope.
#1 does correspond to #2 but this example is rejected by all implementations that correctly implement the c++20 standard. In that standard, we require the example to satisfy the following rules
[class.friend] p11
If a friend declaration appears in a local class ([class.local]) and the name specified is an unqualified name, a prior declaration is looked up without considering scopes that are outside the innermost enclosing non-class scope. For a friend function declaration, if there is no prior declaration, the program is ill-formed.
the wording "correspond" does not guarantee the order of two declarations. It seems that we want the following rules to constrain this example
Otherwise, the terminal name of E is not looked up. The declaration's target scope is the innermost enclosing namespace scope; if the declaration is contained by a block scope, the declaration shall correspond to a reachable([module.reach#3]) declaration that inhabits the innermost block scope.
The text was updated successfully, but these errors were encountered:
[dcl.meaning.general] p2.3 says that
Consider this example
#1
does correspond to#2
but this example is rejected by all implementations that correctly implement the c++20 standard. In that standard, we require the example to satisfy the following rules[class.friend] p11
the wording "correspond" does not guarantee the order of two declarations. It seems that we want the following rules to constrain this example
The text was updated successfully, but these errors were encountered: