title: Assignment operator with an explicit template in C++
body: <p>I'd like to define multiple ways of assignment operators. Minimal example code.</p>
  
  <pre><code>enum class AssignType {
      DeepCopy,
      SharedCopy
  };
  
  struct Container
  {
      const char* x;
      template&lt;AssignType &gt;
      Container&amp; operator=(const Container&amp; other) {
          x = other.x; return *this;
      }
      // ...some specialisations of operator=() could be made
  };
  
  int main()
  {
      Container i1, i2;
      i2.operator=&lt;AssignType::DeepCopy&gt;(i1);
      i2 =&lt;AssignType::DeepCopy&gt; i1; // line 20
      return 0;
  }
  </code></pre>
  
  <p>The g++'s parser gives me an error for line 20. Is there any way to use operators in the "short" form (like in line 20) with explicit templates? C++11 allowed.</p>