Boost logo

Boost Users :

From: Foster, Gareth (gareth.foster_at_[hidden])
Date: 2005-02-08 09:35:38


Hello all,

If you were to write a container that had a certain size, say 6, but may not
always contain 6 items, say it contains 4, what would it be best to have the
following methods do?

size() - returns 6 or 4?
end() - returns an iterator on the 5th or 7th element?

I'm not sure if the standard way of writing such things dictates a certain
approach, or if it is purely down to the intended use.

Thanks for any information.

Gaz

*******************************
* http://planetearthworm.com/ *
*******************************


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net