title: Template class that can take either a size_t parameter or pointer-to-member
body: <p>Is there a way I can specialize a template class based on whether one of the template arguments is a <code>size_t</code> or a pointer-to-data-member?</p>
  
  <p>For instance:</p>
  
  <pre><code>template&lt;typename container_t, size_t offset&gt;
  struct SomeClass
  {
      // Some implementation
      static void foo() {}
  };
  
  template&lt;typename container_t, int container_t::*member&gt;
  struct SomeClass
  {
      // Another implementation
      static void foo() {}
  };
  
  SomeClass&lt;MyClass, 123&gt;::foo();
  SomeClass&lt;MyClass, &amp;MyClass::someMember&gt;::foo();
  </code></pre>