Boost logo

Boost Users :

Subject: Re: [Boost-users] [scoped_array] and boost::begin()
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-08-21 09:44:24


AMDG

Robert Jones wrote:
> On Fri, Aug 21, 2009 at 2:15 PM, Steven Watanabe <watanabesj_at_[hidden]>wrote:
>
>> Robert Jones wrote:
>>
>>> I am shocked to discover that boost::begin() etc, does not seem to
>>> work for boost::scoped_array.
>>>
>>> Is there a reason for this?
>>>
>>>
>>>
>> How would boost::end be implemented?
>> boost::scoped_array doesn't know the size of the array.
>>
>
> Quite. So there would seem to be quite a bit of benefit to having
> scoped_array hold its
> own size. I guess the objection might be that it makes scoped_array bigger
> than a c-array,
> but the difference is pretty small.
>

But if you don't care about small differences, why use
scoped_array instead of std::vector?

In Christ,
Steven Watanabe


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