1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <iostream> using namespace std; template <size_t n> void f(int a[n]) { cout << n << endl; } int main() { f(new (int[5])); return 0; }
1 2 3
In function 'int main()': Line 12: error: no matching function for call to 'f(int*)' compilation terminated due to -Wfatal-errors.