They're equivalent, if you use it for the value, not by reference.
The enum { constantname = initializer };
idiom used to be very popular in header files, so you could use it within a class declaration without problems:
struct X {
enum { id = 1 };
};
Because with a static const member, you would need an out-of-class initializer and it couldn't be in the header file.
Update
Cool kids do this these days:
struct X {
static constexpr int id = 1;
};
Or they go with Scott Meyer¹ and write:
struct X {
static const int id = 1;
};
// later, in a cpp-file near you:
const int X::id;
int main() {
int const* v = &X::id; // can use address!
}
¹ see Declaration-only integral static const and constexpr data
members, Item #30