They are equivalent if you use it for a value, not a reference.
Idiom enum { constantname = initializer }; was very popular in header files, so you can use it in a class declaration without any problems:
struct X { enum { id = 1 }; };
Since with a static member const you will need an initializer outside the class, and it cannot be in the header file.
Update
Cool kids do it these days:
struct X { static constexpr int id = 1; };
Or they go with Scott Meyer No. 1 and write:
struct X { static const int id = 1; };
ΒΉ see Immediate integral static constants and constexpr of participants, No. 30
source share