fork(1) download
  1. #include <iostream>
  2.  
  3. template<int N>
  4. void foo(const int (&)[N]) {
  5. std::cout << "foo(const int (&)[N])\n";
  6. }
  7.  
  8. void foo(const int *) {
  9. std::cout << "foo(const int *)\n";
  10. }
  11.  
  12. int main() {
  13. int a[1] = { 0 };
  14. foo(a);
  15. const int b[1] = { 0 };
  16. foo(b);
  17. }
  18.  
  19.  
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
foo(const int (&)[N])
foo(const int *)