Boost logo

Boost :

From: gennaro_prota (gennaro_prota_at_[hidden])
Date: 2002-03-21 17:57:16

Hi everybody,

in regard to array_traits specializations for built-in
arrays, what about adding a "count" member?

Just a simple:

  BOOST_STATIC_CONSTANT(std::size_t, count = sz);

Even though it's easily realizable with a separate

template <typename T> struct counter;

template <typename T, std::size_t N>
struct counter <T[N]> {
   static std::size_t const count = N;

I think it would have a best place in array_traits

The need (opportunity) for such a member came out this
afternoon, when I was trying to simplify some code
provided by Hyman Rosen on c.l.c++.moderated. BTW I'll
send him my changes and try to convince him to submit
his code (see

Thanks :)


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