
Gennaro Prota <gennaro_prota@yahoo.com> writes:
Hi guys,
a while ago there was some discussion about incorporating a compile-time array count facility in boost. I also provided an implementation for multidimensional arrays. Is there still interest for this? The benefits over the classical sizeof(array)/sizeof(array[0]) idiom are not overwhelming but at least there's a fair syntactical convenience and, of course, the advantage of unit test integration. If there's interest I can add it, to the utility subdirectory I guess (better suggestions are welcome; I really don't like using utility/ as a sort of repository for anything we have no better place for).
The biggest argument for such a mechanism is that it should be more foolproof. I hope it causes a compile error if "array" turns out to be a pointer. -- Dave Abrahams Boost Consulting www.boost-consulting.com