title: What effect does static const have on a namespace member
body: <pre><code>// MyClass.h
  
  namespace MyNamespace {
  
    static const double GasConstant = 1.987;
  
    class MyClass
    {
      // constructors, methods, etc.
    };
  }
  </code></pre>
  
  <p>I previously had GasConstant declared within the MyClass declaration (and had a separate definition in the source file since C++ does not support <code>const</code> initialization of non-integral types).  I however need to access it from other files and also logically it seems like it should reside at the namespace level.</p>
  
  <p>My questions is, what effect does <code>static const</code> have in this case?  Clearly <code>const</code> means I can't assign a new value to GasConstant, but what does a static member at the namespace mean.  Is this similar to static at file scope, where the member is not accessible outside of the unit?</p>