fork download
  1. #include <iostream>
  2.  
  3. template<typename T, size_t n>
  4. void fn(T (&arr)[n]) {
  5. std::cout << n << '\n';
  6. }
  7.  
  8. int main() {
  9. int a[10];
  10. fn(a);
  11. return 0;
  12. }
Success #stdin #stdout 0.01s 5472KB
stdin
Standard input is empty
stdout
10