
10 Mar
2004
10 Mar
'04
7:03 p.m.
"Robert Ramey" <ramey@rrsd.com> writes:
You're missing something. Your declaration of f is equivalent to:
template <int N> void f(int* a);
try:
template <int N> void f(int a(&)[N])
^^^
instead.
Hmm - that didn't work for me. But with the above hint I made the following compile and function with both VC 7.1 and gcc.
template <int N> void f(int (& a)[N]) ^^^^
Err, whoops, sorry. Yeah, Robert has the right solution. -- Dave Abrahams Boost Consulting www.boost-consulting.com