Boost logo

Boost :

From: jsiek_at_[hidden]
Date: 2000-01-12 11:51:58


Howard Hinnant writes:
> This is result of my experience with vector<bool>. I don't have
> extensive experience with proxied containers other than this one. But
> the point is, if I'm wanting to sort a vector<bool>, I don't give a flip
> if I can call flip on a reference. ;-) All I care about is that I can
> call swap on two references. So I require:
>
> static void swap(reference x, reference y);

Yes, I think swap is a fundamental operation that proxies should
support. I put swap in my write-up of the requirements for Proxy.

> member functions in the proxy class. And the proxy need not completely
> duplicate the functionality of an actual reference to be useful for a
> given algorithm.

The down side of the current formulation is that it rules out proxied
container's with value types that have members (unlike vector<bool>).
The question is whether this down side is compensated by the reduced
confusion/error potential. Unless there are real examples of such
proxied containers that people find usefull I would suggest that we
stay with the more conservative formulation.

Cheers,

Jeremy


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