Boost logo

Boost :

From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2004-01-28 14:25:37


On Wed, 28 Jan 2004 18:40:28 +0100, "Pavel Vozenilek"
<pavel_vozenilek_at_[hidden]> wrote:

>
>"Gennaro Prota" <gennaro_prota_at_[hidden]> wrote
>
>> Having a look to some old list messages I've seen there has been some
>> discussion about discovering the number of elements of an array in
>> compile-time. Sorry if I have simply misunderstood something here (I'm
>> rapidly catching up with old threads), but isn't this enough?
>>
>>
>> http://article.gmane.org/gmane.comp.lib.boost.devel/3216
>>
>Similar technique is used in container_traits library
>(written by Thorsten Ottosen).
>
>Look for size_type.hpp, in sandbox or Files section.
> Use: n = sizeof(sizer(an_array))

I can't look at it right now, anyway I was just pointing out that it
is possible (and easy), in case no one did that.

Just one note: since this is a very elementary facility that concerns
built-in arrays only I would prefer it to be indipendent from the
container_traits library, if it will ever get into boost.

Genny.


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