Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-12-03 14:15:22


Douglas Paul Gregor <gregod_at_[hidden]> writes:

>> <shrug> An array is a type. Describing built-in types is type_trait's
>> main gig. Shunning one type out of all the rest seems unnecessarily
>> inconsistent.
>
> I'm happy with keeping is_array (it's a very basic type trait, I think),
> but rank and dimension haven't proven themselves. Do we even have them in
> Boost? <looks it up> No, we don't, so one could conjecture that perhaps
> they aren't necessary. remove_bounds is in the Boost type traits lib,
> although it doesn't seem to be used anywhere in the library itself.
>
> We better be darn sure we need rank and dimension before we reserve those
> names in namespace std::tr1 or std.

I've often wanted dimension for exactly the same reasons as Alisdair,
FWIW. I always feel like I'm settling for something worse when I
write sizeof(x)/sizeof(x[0]). Actually I want the macro which lets me
write 'x' once only and portably fails for non-arrays.

But do I need it? Who needs computers after all? Who needs the
aggravation?

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk