Boost logo

Boost :

From: Ed Brey (brey_at_[hidden])
Date: 2000-01-02 08:40:09

> From: Aleksey Gurtovoy [mailto:alexy_at_[hidden]]
> exactly =) and when you add 'size' to 'point' you always receive a point. I
> know all these rules may seem too complicated, but then I actually have
> implemented all of them in code, they seem to work ;) I suggest to play some
> time with current implementation and see, if this issue will cause any
> problems. I still see some attractive sides of this approach and want to
> insure in its waning before we drop it off ;)

It's not complicated at all, and easy to remember, when you consider that
point and size exactly parallel C++'s pointer and size_t (if we choose to use
these semantics):

pointer + pointer // illegal
pointer - pointer -> size
pointer + size -> pointer
poniter - size -> pointer

Also, having different constructors that take the different types is nothing
vector(pointer, pointer) -> create vector with these contents
vector(size) -> create empty vector with this size

Boost list run by bdawes at, gregod at, cpdaniel at, john at