Boost logo

Boost :

From: Howard Hinnant (hinnant_at_[hidden])
Date: 2002-06-11 10:31:15


On Tuesday, June 11, 2002, at 09:21 AM, Howard Hinnant wrote:

>> On Mon, 10 Jun 2002, Howard Hinnant wrote:
>>>> // The following 2 classes make sure that the bitset
>>>> // gets allocated in an exception safe manner
>>>
>>> While this is a very good design pattern, it is not clear to me how it
>>> is helping in this application. But also it does no harm ... except:
>>
>> Why, is there a simpler way in this case to ensure the exception
>> safety?
>
> I may have skimmed the constructors too fast. I was thinking there was
> only one throw point in the body of the constructors. If it throws
> there should be nothing for the base class to do. If it doesn't,
> nothing else will. But I could be mistaken, I probably should've
> crawled into the constructor code a little more thoroughly before
> making that comment.

Oh, I see it now. When constructing from InputIterators there is more
than one throw point because you can't get the range from the input
iterators (you have to incrementally bump the capacity). I had
forgotten this. My bad.

-Howard


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