Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2000-06-11 18:30:14

From: <jsiek_at_[hidden]>

> Workaround idea: have the friend functions call other template
> functions that have both "real" versions and "dummy" versions. The
> "dummy" versions would be selected when the iterators do not support
> the operation.

The problem with that is that you'd be able to compile code that does any of
the following with wrapped bidirectional iterators p, q:

q = p + 5
int x = p - q;

We don't want that, do we? I sure don't

I'm not sure the B&N trick buys us much in this case. It's just a
convenience for library writers, but nobody said a library writer's life
would always be easy... ;)


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