From 0c7c54f8aea8cb373d951f649212a76d227ca3a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Brand?= Date: Sat, 11 Jan 2025 13:22:31 +0100 Subject: [PATCH] [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. --- source/templates.tex | 1 - 1 file changed, 1 deletion(-) diff --git a/source/templates.tex b/source/templates.tex index d616394cc3..9ef3233fcb 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -2659,7 +2659,6 @@ template struct A { enum E : T; }; -A a; template enum A::E : T { e1, e2 }; A::E e = A::e1; \end{codeblock}