fork download
  1. #include <iostream>
  2.  
  3. template <typename ...Args> struct C
  4. {
  5. static void foo() { int a[] = { (Args::m(), 0)... }; }
  6. };
  7.  
  8. struct A { static void m() { std::cout << "M\n"; } };
  9.  
  10. int main()
  11. {
  12. C<A, A, A>::foo();
  13. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
M
M
M