Boost logo

Boost :

From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2004-01-28 12:40:28


"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))

/Pavel


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