|
Boost : |
Subject: Re: [boost] [review] Heaps
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2011-06-01 13:16:33
Den 01-06-2011 18:24, Tim Blechmann skrev:
>>> what kind of pre- and postconditions are you refering to? do you have
>>> anything specific in mind? or is there a library which does this in a
>>> very good way?
>>>
>>>> and that the implementaion checks these with assertions
>>>> e.g. for increase()/decrease()
>>>> (didn't look at the source).
>>>
>>> ... this is a good point ... i should probably add some sanity checks
>>
>> I couln't find a precondition in the docs for eg. increase().
>
> the concept->mutability is describing this API in detail, but i will try to
> improve the documentation in the class reference ...
Also, I pressume pop() requires !empty(). /All/ functions should also
have a throws clause, perhaps conditionally on the held type.
In this context, exception-safety guarantees should also be stated.
Additionally, each function should state if it invalidates iterators and
handles (but only the ones that does need to state it).
This is really needed.
-Thorsten
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk