Boost logo

Boost Users :

From: Duane Murphy (duanemurphy_at_[hidden])
Date: 2001-10-25 16:34:34


--- At Thu, 25 Oct 2001 14:19:58 -0700, Darin Adler wrote:

>It's a bug.
>
>I'll fix it in cvs right now.
>
>The array_traits.hpp predates array.hpp, and is still marked "beta", but I
>love it, use it a lot, and wish it wasn't marked "beta". Maybe I should take
>it through the formal review process.

Thanks Darin.

I am wondering, can you explain further why you prefer array_traits to array?

I was trying to decide which to use for a const char array that needed
container semantics. Neither of these do well with the darned terminator;
the array is always one to big, so you have to resort to array syntax for
characters that's kind of messy. Maybe there is a better choice.

const array< char, 2 > delim = { { '%', '%' } }; // This syntax is
always needed for array<>

then use container syntax ie delim.begin(), delim.end();

or

const delim = { '%', '%' }; // using "%%" is an array of size 3 instead of 2.

the use boost::begin( delim ), boost::end( delim ).

Your opinion would be most useful.

..Duane


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net