title: Compiler issue with Clang 3.2 or am I doing it wrong? (variadic templates & default parameters)
body: <p>I've gone a bit deep with template programming in my latest library rewrite, and so I made template that assembles bitmasks which I want to use as a method parameter initializer:</p>
  
  <pre><code>test_scanner( unsigned int avec = CtrlVec&lt;'\n','\r'&gt;::mask ) ;
  </code></pre>
  
  <p>This works with GCC 4.8, but I get a series of errors from clang 3.2:</p>
  
  <pre><code>error: expected parameter declarator
  error: expected ')'
  error: expected '&gt;'
  </code></pre>
  
  <p>Putting a () around CtrlVec fixes the problem.  What I am curious is, does it work in later versions of Clang or should I submit this as a possible error in the compiler, or am I doing something wrong?</p>
  
  <p>The entire test case is here:</p>
  
  <pre><code>namespace test
  {
      // template magic for building a bit mask from control characters
    template &lt;char...&gt; struct CtrlVec ; 
    template &lt;char c&gt; struct CtrlVec&lt;c&gt;
    { 
      static_assert( ( c &lt; 0x20 ), "Only for control characters" ) ; 
      enum { mask = ( 1 &lt;&lt; c ) } ; 
    } ; 
    template &lt;char c, char... cs&gt; struct CtrlVec&lt;c, cs...&gt;
    { 
      static_assert( ( c &lt; 0x20 ), "Only for control characters" ) ; 
      enum { mask = ( 1 &lt;&lt; c ) | CtrlVec&lt;cs...&gt;::mask } ; 
    } ; 
  
    static_assert( CtrlVec&lt;'\0', '\001', '\002'&gt;::mask == 0x7, "") ; 
  
      /// 
  
    class test_scanner
    { 
      public:
            // this version works fine in GCC, but gives an error in Clang 3.2
        test_scanner( unsigned int avec = CtrlVec&lt;'\n','\r'&gt;::mask ) ;
  
            // adding the () makes it work
        test_scanner( int good, unsigned int avec = ( CtrlVec&lt;'\n','\r'&gt;::mask ) ) ; 
    } ; 
  
  } ;
  
  int main() {}
  </code></pre>
  
  <p>or you can pull it from github:</p>
  
  <p><a href="https://github.com/woolstar/test/blob/master/misc/testinitargs.cpp" rel="nofollow">https://github.com/woolstar/test/blob/master/misc/testinitargs.cpp</a></p>