W
Wayne Shu
Why there has such a rule for the template non-type argument??
but address of an object of external linkage is acceptable!!
e.g.
template <int *p>
class C;
int i;
int arr[10];
C<&i> *c1; // ok, the address of an int with external linkage
C<&arr[0]> *c2; // error, element of array is not acceptable.
there is some difference between the i and arr[0]??
but address of an object of external linkage is acceptable!!
e.g.
template <int *p>
class C;
int i;
int arr[10];
C<&i> *c1; // ok, the address of an int with external linkage
C<&arr[0]> *c2; // error, element of array is not acceptable.
there is some difference between the i and arr[0]??