Boost logo

Boost :

From: me22 (me22.ca_at_[hidden])
Date: 2006-06-25 13:11:32

On 6/25/06, Gennaro Prota <gennaro_prota_at_[hidden]> wrote:
> Yes, of course. I've reattached an implementation I proposed here a
> couple of years ago. The reason why I'm asking is basically that it
> would require some "somersault" to make it work with VC6 and other
> broken compilers, so I woldn't spend time on that if there is no
> interest.
The attachment didn't come out properly for me.

I think it's worth including. It's not all that uncommon; even
Freenode/##C++'s channel bot has the following factoid:
Don't use sizeof() to get the size of an array, because sizeof() will
do the wrong thing if that 'array' is actually a pointer. Use the
following instead: template <typename T, size_t N> size_t array_size(T
(&)[N]) { return N; }

Of course that one only works for the outermost dimension of the array
and I have no idea whether it works in VC6 at all.

Boost list run by bdawes at, gregod at, cpdaniel at, john at