Boost logo

Boost :

From: helmut.zeisel_at_[hidden]
Date: 2001-06-28 12:45:05


--- In boost_at_y..., "David Abrahams" <david.abrahams_at_r...> wrote:

>
> Actually, I thought of a pretty strong counterexample: take a look
at
> random_access_iterator_helper. It makes sense to subtract the
distance type
> from the iterator type. Does it make sense to convert the distance
type to
> the iterator type? I don't think so.

You are right.
iterator minus int makes sense, while int minus iterator is nonsense.

Thinking of other examples I see that it makes
some sense to divide a cake by two but less sense
to divide two by a cake :-)

>
> So, I think we'd better stay with what we've got, or at most, add an
> additional operator template.
>

I would appreciate an additional related
family of operator templates.

As you might have observed,
I am working on an unlimited integer class
where your operator templates are very helpful.

There are, however, some other issues
(must unlimited integer classes
support the full operators interface?
In particular, the boolean operators |,&,^ might
restrict the implementation to a power of 2 radix).

It is no problem to construct such additional
things from your class, but I think a better
place would be directly in your header files.

Hopefully we can discuss these issues
in more details when my implementation
is available.

Helmut


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