title: Can static class functions of a templated class be used without a template parameter?
body: <p>I have a templated class which contains a static function which does not depend on the template parameter. Yet the compiler seems to force me to specify a typename when I use the function.</p>
  
  <pre><code>template &lt;typename T&gt;
  class MyClass {
      ...
      static void function();
  };
  
  template &lt;typename T&gt;
  void MyClass&lt;T&gt;::function() {
      ....
  }
  </code></pre>
  
  <p>This function can be used as:</p>
  
  <pre><code>MyClass&lt;int&gt;::function();
  </code></pre>
  
  <p>But the 'int' is just there to satisfy the compiler. It doesn't mean anything, and can be replaced by any other type, which doesn't increase code readability. I would like to do someting like</p>
  
  <pre><code>MyClass&lt;&gt;::function();
  </code></pre>
  
  <p>or even</p>
  
  <pre><code>MyClass::function();
  </code></pre>
  
  <p>but the compiler doesn't let me. I realize that this is because in the header files I have explicitly marked the function as being templated, but when I remove the '&lt; T >' from the header file it doesn't compile either.</p>
  
  <p>What is the correct way to do this?</p>