Boost logo

Boost :

From: Yitzhak Sapir (yitzhaks_at_[hidden])
Date: 2002-06-09 14:10:26


It occured to me that it might be useful to have a library of predicates that could, given iterators or a container, provide certain logical assertions about how operations affect the iterators. That is, one could static_assert on some predicate called insert_does_not_invalidate_iterators<container_t>::value. This would be useful if the container type container_t was later changed. Various functions that depend on specific properties of the containers would then have to pass a compile time check ensuring their pre-assumptions about the container holds. Given the amount of different operations, and the variance in how different operations affect the container's iterators, and the ease with which STL lends itself to changing container types, having a ready-made library of these could be very useful as a general library or addition to the static assertions or concept checking libraries.


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