fork download
  1.  
  2. template <typename...>
  3. struct G {};
  4.  
  5. template <typename>
  6. struct F;
  7.  
  8. template <typename... As>
  9. struct F<G<As...>>
  10. {
  11. static void f(As... first, int second)
  12. {
  13. static_assert(sizeof...(As) == sizeof...(first), "");
  14. }
  15. };
  16.  
  17. int main () {
  18. F<G<int, int>>::f(1, 1, 1);
  19. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:11:42: error: parameter packs must be at the end of the parameter list
prog.cpp: In static member function 'static void F<G<As ...> >::f(As ..., int) [with As = {int, int}]':
prog.cpp:18:21:   instantiated from here
prog.cpp:13:9: error: static assertion failed: ""
stdout
Standard output is empty