title: Does lambda capture support variadic template arguments
body: <p>It would be nice if I could do the following:</p>
  
  <pre><code>template &lt;class RT, class... PT&gt;
  class Event 
  {
      ...
      void operator()(PT... args)
      {
          std::for_each(
              l.begin(), l.end(), [args...](Handler *p) { (*p)(args...); }
          );
      }
      ...
  };
  </code></pre>
  
  <p>Unfortunately I couldn't make it compile with g++ 4.7.2 (-std=c++0x):</p>
  
  <blockquote>
    <p>evtempl.hh: In member function 'void elt::Event::operator()(PT ...)':
    evtempl.hh:75:54: error: expected ',' before '...' token
    evtempl.hh:75:54: error: expected identifier before '...' token
    evtempl.hh:75:57: error: parameter packs not expanded with '...':
    evtempl.hh:75:57: note:         'args'
    evtempl.hh: In lambda function:
    evtempl.hh:76:26: error: expansion pattern 'args' contains no argument packs
    evtempl.hh: In instantiation of 'void elt::Event::operator()(PT ...) [with RT = void; PT = {int}]':
    testevtempl.cc:28:9:   required from here
    evtempl.hh:74:9: error: using invalid field 'elt::Event::operator()(PT ...)::::Handler*)>::__args'
    evtempl.hh: In instantiation of 'void elt::Event::operator()(PT ...) [with RT = void; PT = {int, const char*}]':
    testevtempl.cc:29:20:   required from here
    evtempl.hh:74:9: error: using invalid field 'elt::Event::operator()(PT ...)::::Handler*)>::__args'</p>
  </blockquote>
  
  <p>instead, I have to change that lambda to the old, mundane syntax:</p>
  
  <pre><code>for (itr = l.begin(); itr != l.end(); ++itr)
       (*(*itr))(args...);
  </code></pre>
  
  <p>This one compiles and works fine.</p>
  
  <p>I wonder why the lambda syntax doesn't work.</p>
  
  <ol>
  <li>Did I do something wrong or miss something? </li>
  <li>Is such thing outlawed in the c++11 standard? </li>
  <li>or, this is allowed by the standard, but it's
  a problem of the current compiler?</li>
  </ol>
  
  <p>I tried </p>
  
  <pre><code>[=](Handler *p) { (*p)(args...); }
  </code></pre>
  
  <p>it gives the same error as if you did: </p>
  
  <pre><code>[args](Handler *p) { (*p)(args...); }
  </code></pre>
  
  <p>complaining parameter packs not expanded</p>