I accidentally found that the Clang compiler allows :
inline class AAA
{
};
in C++. What\'s this?
PS. I reported this to Clang ma
clang shouldn't allow this, inline
can only be used in the declaration of functions, from ISO/IEC 14882:2003 7.1.2 [dcl.fct.spec] / 1 :
Function-specifiers can be used only in function declarations.
inline
is one of three function-specifiers, virtual
and explicit
being the others.
As @MatthieuM notes, in the next version of C++ (C++0x), the inline
keyword will also be allowed in namespace definitions (with different semantics to inline
as a function-specifier).