
On Mon, Feb 02, 2004 at 11:50:45PM -0800, Rich Sposato wrote:
The containers are called flex_set, flex_map, flex_multiset, and flex_multimap. They are similar to the 4 STL associative containers. There are two important differences between the STL containers and these: 1. You can search on any type that is comparable to the key_type, rather than just the key_type. (The STL associative containers only allows searches on the same type as the key.) 2. You do *not* need to create a temporary object of key_type to search through the containers. (The STL containers require you to create one temporary object to search for another.)
A good idea. I recall wishing for something like this a while ago; I don't remember if it stemmed from an actual problem in practice or just general unhappiness with the std:: interface in theory. (It might be even more swell if comparators could know about 'equivalence' as well, so you could test for equivalence using one user-defined function, rather than two calls like !c(x,y)&&!c(y,x).) Do you have have documentation of the new 'concepts'? Specifically it seems like flex_xxxx<T> uses a new ComparableTo<T,U> concept to place requirements on both the Comparator and the template arguments to methods like find(). -- -Brian McNamara (lorgon@cc.gatech.edu)