|
Boost : |
From: Philippe Vaucher (philippe.vaucher_at_[hidden])
Date: 2006-06-28 09:31:07
Hum, actually it might be better to do it like :
template <class Arr>
struct count_of
{
BOOST_STATIC_ASSERT(boost::is_array<Arr>::value);
enum { value = sizeof(Arr)/sizeof(Arr[0]) };
};
Sorry if I missed a point, joined late in the discussion :)
Philippe
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk