What is the point of declaration of enumeration types? Is it immediately after the name of an enumeration? I saw Standard C++ 14 (n4296):
The point of declaration for an enumeration is immediately after the identifier (if any) in either its enum-specifier (7.2) or its first opaque-enum-declaration (7.2), whichever comes first
But when I try to reproduce it
template <class T>
struct CL
{
using UndType = int;
};
enum class E: CL<E>::UndType; //error: E is undefined
I have got an error on all the compilers, although enum-base for enumeration E is placed after the identifier and must be visible
Aucun commentaire:
Enregistrer un commentaire