title: Template template class with enum specification fails on MSVC++ Compiler: C3201
body: <h1>Code</h1>
  
  <p>Here is the <a href="http://sscce.org/" rel="noreferrer">SSCCE</a> example of my problem:</p>
  
  <pre><code>// My Library, which I want to take in the user's enum and a template class which they put per-enum specialized code
  template &lt;typename TEnum, template &lt;TEnum&gt; class EnumStruct&gt;
  struct LibraryT { /* Library stuff */ };
  
  // User Defined Enum and Associated Template (which gets specialized later)
  namespace MyEnum {
      enum Enum {
          Value1 /*, ... */
      };
  };
  
  template &lt;MyEnum::Enum&gt;
  struct MyEnumTemplate {};
  
  template &lt;&gt;
  struct MyEnumTemplate&lt;MyEnum::Value1&gt; { /* specialized code here */ };
  
  // Then the user wants to use the library:
  typedef LibraryT&lt;MyEnum::Enum, MyEnumTemplate&gt; MyLibrary;
  
  int main() {
      MyLibrary library;
  }
  </code></pre>
  
  <p>[<strong>EDIT</strong>: Changing <code>LibraryT&lt;MyEnum::Enum, MyEnumTemplate&gt;</code> to <code>LibraryT&lt;typename MyEnum::Enum, MyEnumTemplate&gt;</code> has no effect]</p>
  
  <h1>Error</h1>
  
  <p>The functionality I desire is the ability to create a library based on an enum and a class which is specialized by that enum.  Above is my first attempt.  I believe it is 100% C++, and GCC backs me up and says it all works.  However, I want it to compile with the MSVC++ Compiler and it refuses:</p>
  
  <pre><code>error C3201: the template parameter list for class template 'MyEnumTemplate' 
    does not match the template parameter list for template parameter 'EnumStruct'
  </code></pre>
  
  <h1>Question</h1>
  
  <p>Is there some way I can make the MSVC++ compiler [<strong>EDIT</strong>: MSVC++ 11 Compiler (VS 2012)] like my code?  Either by some addition specifications or different approach?</p>
  
  <h1>Possible (but undesirable) Solution</h1>
  
  <p>Hard code the enum type to be some integral type (the underlying type).  Then no problems.  But then my library is operating on integrals instead of the enum type (undesirable, but working)</p>
  
  <pre><code>// My Library, which I want to take in the user's enum and a template class which they put per-enum specialized code
  typedef unsigned long IntegralType; // **ADDED**
  
  template &lt;template &lt;IntegralType&gt; class EnumStruct&gt; // **CHANGED**
  struct LibraryT { /* Library stuff */ };
  
  // User Defined Enum and Associated Template (which gets specialized later)
  namespace MyEnum {
      enum Enum {
          Value1 /*, ... */
      };
  };
  
  template &lt;IntegralType&gt; // **CHANGED**
  struct MyEnumTemplate {};
  
  template &lt;&gt;
  struct MyEnumTemplate&lt;MyEnum::Value1&gt; {};
  
  // Then the user wants to use the library:
  typedef LibraryT&lt;MyEnumTemplate&gt; MyLibrary; // **CHANGED**
  
  int main() {
      MyLibrary library;
  }
  </code></pre>