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
A declaration D is decl-reachable from a declaration S in the same translation unit if:
[...]
there exists a declaration M that is not a namespace-definition for which M is decl-reachable from S and either
[...]
D declares a namespace N and M is a member of N, or
The example after this rule has a case that:
template<typename> structS;
template<typename, int> structS2;
constexprintg(int);
template<typename T, int N>
S<S2<T, g(N)>> f(); // S, S2, g, and :: are decl-reachable from f
The declaration M(e.g. S, S2, g) is decl-reachable from S(e.g. f) and is a member of ::, however, :: the global namespace does not have a declaration per [basic.namespace.general] p3
[module.global.frag] p3 says
The example after this rule has a case that:
The declaration
M
(e.g.S
,S2
,g
) is decl-reachable fromS
(e.g.f
) and is a member of::
, however,::
the global namespace does not have a declaration per [basic.namespace.general] p3The comment is just a bit misleading. It appears to me that the emphasized wording only applies to the namespace that has a namespace-definition.
The text was updated successfully, but these errors were encountered: