There's no difference.
The syntax class Foo
is supported for consistency with struct Foo
, which in turn is supported for C compatibility. In C a struct
is not a type by itself: the type corresponding to a struct called S
is struct S
, which is usually named via a typedef
. In C++ the typedef
isn't needed, and the syntax is largely irrelevant. I've found it useful for introducing "inline" tag types for template instantiations, like X< whatever, struct X_tag >
, where the tag type is an incomplete type. But that's all.