fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. template<class T, std::size_t N>
  5. void Foo(T (& arr)[N])
  6. {
  7. cout << "array" <<endl;
  8. }
  9.  
  10. // общая
  11. template<class T>
  12. void Foo(T & val)
  13. {
  14. cout << "general" <<endl;
  15. }
  16.  
  17. int main()
  18. {
  19. // вызываем
  20. int arr[10] = {0};
  21. Foo(arr);
  22. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
array