title: Trouble with template parameters used in macros
body: <p>I'm trying to compile the following piece of code, I get an error on the line which specializes std::vector, it seems the one parameter being passed-in is somehow being assumed to be two parameters. Is it perhaps something to do with angle-brackets?</p>
  
  <p>Is there a special way/mechanism where by such parameters can be correctly passed to the macro?</p>
  
  <pre><code>#include &lt;vector&gt;
  
  template&lt;typename A&gt;
  struct AClass {};
  
  #define specialize_AClass(X)\
  template&lt;&gt; struct AClass&lt;X&gt; { X a; };
  
  
  specialize_AClass(int) //ok
  
  specialize_AClass(std::vector&lt;int,std::allocator&lt;int&gt; &gt;) //error
  
  int main()
  {
     return 0;
  }
  </code></pre>
  
  <p>The error that I get is as follows:</p>
  
  <pre><code>1 Line 55: error: macro "specialize_AClass" passed 2 arguments, but takes just 1
  2 Line 15: error: expected constructor, destructor, or type conversion before 'int'
  3 compilation terminated due to -Wfatal-errors.
  </code></pre>
  
  <p>Link: <a href="http://codepad.org/qIiKsw4l">http://codepad.org/qIiKsw4l</a></p>