Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-03-10 14:03:25


"Robert Ramey" <ramey_at_[hidden]> 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

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk