Compiler Error C2891
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Compiler Error C2891

Error Message

'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; }
© 2015 Microsoft