|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-06-28 11:12:21
Gennaro Prota wrote:
> Sure that's easy for monodimensional arrays. When you write something
> like, for instance,
>
> COUNT_OF_N(3, x)
Out of curiosity, have you ever needed this? I use the one-dimensional
function all the time, but I've never, ever, needed to obtain "the 3rd
size".
By the way, Microsoft seems to be pushing _countof( x ) as a name for this
functionality, probably with the intention to make it countof if it gets in
an official C or C++ document one day. I've always used array_size or just
size, but countof isn't bad.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk