Quote Originally Posted by laserlight View Post
The standard states:
<quote snipped>
I posit that this means that indeed the name main can be used to name enumerations, classes, etc, except in the global namespace (and std, but that's another matter).
Two paragraphs further down (I only have the 1998 C++ standard handy, but IIRC the same words are in C++-11)

Quote Originally Posted by C++ 1998
The function main shall not be used (3.2) within a program. The linkage (3.5) of main is implementation defined. A program that declares main to be inline or static is ill formed. The name main is not otherwise reserved. [Example: member functions, classes, and enumerations can be called main, as can entities in other namespaces. ]
Quote Originally Posted by laserlight View Post
This is why my opinion is that the behaviour is undefined.
My view is that the content of the standard is a bit too ambiguous to either support or refute that opinion. I think we can safely agree, informally, it is not a good thing to do