Skip to content

Commit 0c7c54f

Browse files
committed
[temp.mem.enum] Fix consistency with [temp.inst]
The example is inconsistent with [temp.inst] p3, which states the following: "The implicit instantiation of a class template specialization causes - the implicit instantiation of the declarations, but not of the definitions, of [...] scoped member enumerations [...]; and - the implicit instantiation of the definitions of [...] unscoped member enumerations [...]" Hence, the example can be fixed by either (1) omitting the instantiation or (2) by replacing the unscoped with a scoped enumeration. Since the implicit instantiation does not contribute to the point of [temp.mem.enum], the inconsistency can be solved most easily with alternative (1). Note: The example was originally taken from DR1206.
1 parent b801b54 commit 0c7c54f

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

source/templates.tex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2659,7 +2659,6 @@
26592659
template<class T> struct A {
26602660
enum E : T;
26612661
};
2662-
A<int> a;
26632662
template<class T> enum A<T>::E : T { e1, e2 };
26642663
A<int>::E e = A<int>::e1;
26652664
\end{codeblock}

0 commit comments

Comments
 (0)