Boost logo

Boost :

From: Daryle Walker (darylew_at_[hidden])
Date: 2007-08-02 05:39:38


I'm trying out a multi-indexed container that uses a set-like
(ordered_unique) interface and a vector-like (random_access) interface.
  Each interface has a "max_size" member function. Could they ever
return different values?

Some functions, like (member) swap and clear, have no definitions given.
  It seems like the author assumes that we'll assume that the undefined
functions work like those in STL. But I'll prefer something more
precise, to (1) confirm the exact semantics and (2) know the exact
complexity these functions may have. (I noticed this problem while I
was trying to define the complexity of my wrapper class's member functions.)

Some member functions, like the aforementioned "max_size" and "clear,"
seem to be same for all index styles. Could those be re-factored into
the main class, like "get_allocator" is? Or would that mess up the
ability to keep each index's interface independent?

-- 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT hotmail DOT com

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