RAD Studio
ContentsIndex
PreviousUpNext
E2485: Cannot use address of array element as non-type template argument

Non-type template arguments may only be of integral type, or the address of a global variable. They cannot be the address of an array element. For example:

int x[100];
template<int T>
class foo;
foo<&x[0]> y;// error: not an integral or global address
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!