This documentation is archived and is not being maintained.

Compiler Error C2891

'parameter' : cannot take the address of a template parameter

Instead of using code like this:

template <int i> int* f() { return &i; }

use this:

template <int i> int* f() { return i; }
Show: