|
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
itself.
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
http://groups.google.com/groups?hl=it&ie=ISO-8859-1&oe=ISO-8859-
1&threadm=5egi7u81jlv05qnbjctuj5jlfe7oabvvna%404ax.com).
Thanks :)
Genny.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk