Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-12-27 16:48:08


On Thursday, December 27, 2001, at 03:55 AM, ncmcantrip wrote:

>>
>> Interesting.
>>
>> Did you consider asserting or throwing on b < e precondition
>> violations?
>
> As a precondition, it is a logical error to insert into the set elements
> that are already present. The type std::set<> doesn't throw if you try
> to insert the same element again. Passing a range to std::set<> with
> the
> iterators reversed does not result in an exception.
>
> I cannot imagine how client code could respond meaningfully to such an
> exception.
>
What about asserting, as Beman suggested?

-Dave


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