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
Consider the example that follows [temp.dep.type] p3
template<classT> structA {
typedefint M;
structB {
typedefvoid M;
structC;
};
};
template<classT> structA<T>::B::C : A<T> {
M m; // OK, A<T>::M
};
The example implies that A<T> is a current instantiation class in the definition of A<T>::B::C. However, according to [temp.dep.type#1.2]
A name or template-id refers to the current instantiation if it is
[...]
in the definition of a primary class template or a member of a primary class template, the name of the class template followed by the template argument list of its template-head ([temp.arg]) enclosed in <> (or an equivalent template alias specialization),
[...]
In this example, the primary class template is A, Is that saying the member class C of the nested class B is a member of class template A?
The text was updated successfully, but these errors were encountered:
xmh0511
changed the title
Are members of a nested class be members of the enclsong class?
Are members of a nested class be members of the enclosing class?
Sep 24, 2021
Consider the example that follows [temp.dep.type] p3
The example implies that
A<T>
is a current instantiation class in the definition ofA<T>::B::C
. However, according to [temp.dep.type#1.2]In this example, the primary class template is
A
, Is that saying the member classC
of the nested classB
is a member of class templateA
?The text was updated successfully, but these errors were encountered: