title: template parameters for free functions
body: <p>I'm experimenting with template template parameters.
  I have no problems to make them work with classes but for some reason it does not work with functions. </p>
  
  <pre><code>enum class MyEnum { A, B, C, D};
  
    template&lt;class EnumType, template&lt;EnumType&gt; class Fun &gt;
    class MyTest
      {
      }
  
      template&lt;MyEnum myEnum&gt;
        void freeFunc(int argument)
          {
          LOG_ERROR("  void freeFunc(int argument) default case!!! ");
          }
  
        template&lt;&gt;
        void freeFunc&lt;MyEnum::A&gt;(int argument); // implemented in cpp
  
        template&lt;&gt;
        void freeFunc&lt;MyEnum::B&gt;(int argument); // implemented in cpp
  
        template&lt;&gt;
        void freeFunc&lt;MyEnum::C&gt;(int argument); // implemented in cpp
  
        template&lt;&gt;
        void freeFunc&lt;MyEnum::D&gt;(int argument); // implemented in cpp
  
  
  template&lt;MyEnum s&gt;
  class Cde
    {
     public:
    };
  
  
    MyTest&lt;MyEnum, Cde &gt; test1; // does compile
  
    MyTest&lt;MyEnum, freeFunc &gt; test2; // does not compile
  </code></pre>
  
  <p>I don't understand why the test2 does not compile.  It just says:
   error:   expected a class template, got 'freeFunc'</p>
  
  <p>What am I doing wrong?</p>
  
  <p>[edit] what I'm looking for is a way to get a generic way to both get free functions and class template templatized on an enum class</p>