title: static const members of template classes
body: <p>I have a template class with a static const member:</p>
  
  <pre><code>template &lt;class T&gt;
  class A
  {
  public:
      A(T val) : t(val) {}
  
      static const int VALUE = 5;
  
      T t;
  };
  </code></pre>
  
  <p>Let's say that somewhere in my code, I'm instantiating it using types int, char, and long. Now I want to access VALUE:</p>
  
  <pre><code>int main()
  {
      int i1 = A&lt;int&gt;::VALUE;
      int i2 = A&lt;char&gt;::VALUE;
      int i3 = A&lt;long&gt;::VALUE;
  
      return 0;
  }
  </code></pre>
  
  <p>Aren't all of the above identical ways to access the same thing? In cases like this, do others just choose a random type? Is there any way to avoid specifying the type?</p>