Re: Reverse in std_vector.hh

2006-09-08 Thread Ruud van Silfhout
Han-Wen Nienhuys wrote: Ruud van Silfhout wrote: Hi, I have made an extension for the reverse function in std_vector.hh. The code suggests to implement template specialisation for reverse vector. On second thought, I have reservations whether this is a useful idea, it adds quite a lot of c

Re: Reverse in std_vector.hh

2006-09-08 Thread Han-Wen Nienhuys
Ruud van Silfhout wrote: Hi, I have made an extension for the reverse function in std_vector.hh. The code suggests to implement template specialisation for reverse vector. On second thought, I have reservations whether this is a useful idea, it adds quite a lot of code, and your memrev funct

Re: Reverse in std_vector.hh

2006-09-07 Thread Joe Neeman
On Thu, 2006-09-07 at 21:58 +0200, Ruud van Silfhout wrote: > it uses malloc to allocate memory for each item. This can also be done > using alloca, which allocates memory on the stack and, as a consequence, > does not have to be freed. but for alloca the same holds as for memrev, > it is not su

Re: Reverse in std_vector.hh

2006-09-07 Thread Han-Wen Nienhuys
Ruud van Silfhout wrote: Hi, I have made an extension for the reverse function in std_vector.hh. The code suggests to implement template specialisation for reverse vector. This is what I have done, plus specialisation for float and double vectors. The code depends on the availability of memrev

Reverse in std_vector.hh

2006-09-07 Thread Ruud van Silfhout
Hi, I have made an extension for the reverse function in std_vector.hh. The code suggests to implement template specialisation for reverse vector. This is what I have done, plus specialisation for float and double vectors. The code depends on the availability of memrev, which is not available