<p>If you want to associate some constant value with a class, here are two ways to accomplish the same goal:</p>

<pre><code>class Foo
{
public:
    static const size_t Life = 42;
};

class Bar
{
public:
    enum {Life = 42};
};
</code></pre>

<p>Syntactically and semantically they appear to be identical from the client's point of view:</p>

<pre><code>size_t fooLife = Foo::Life;
size_t barLife = Bar::Life;
</code></pre>

<p>Is there any reason other than just pure style concerns why one would be preferable to another?</p>

They're not identical:
```
```
size_t *pLife1 = &Foo::Life;
size_t *pLife2 = &Bar::Life;
```
```