|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2000-06-27 14:48:03
> - I agree that an enum for N should be provided, and that
> static_size is probably the best name yet.
I wonder in what situations would a static_size be useful.
If you know that you are dealing with array, you'd write
template<class T, size_t N> void f(array<T, N>& a);
On the other hand, if you don't know that the container you are dealing with
is an array, you wouldn't be able to use static_size - no other container
has such a member.
> - swap (if it is to be provided) should use std::swap_ranges.
>
> - operator== should use std::equal.
>
> - operator< should use std::lexicographical_compare.
When I implemented my own array class, I found that the explicit loops
generated better code than the standard algorithms. This would probably
change in the future.
-- Peter Dimov Multi Media Ltd.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk