fork download
  1. #include <iostream>
  2.  
  3. template<typename T>
  4. void foo()
  5. {
  6. T x;
  7. x[0] = 1;
  8. x[1] = 2;
  9. std::cout << sizeof(x);
  10. }
  11.  
  12. int main()
  13. {
  14. foo<int[2]>();
  15. }
Success #stdin #stdout 0.02s 2680KB
stdin
Standard input is empty
stdout
8