Boost logo

Boost :

From: jsiek_at_[hidden]
Date: 1999-12-09 00:57:23


Gabriel Dos Reis writes:
>
> ?? If the operator is not provided, then you get a compile-time error,
> as you do with a global function. Actually the error happens in the
> global function you forward operations to.
> But as I said in my earlier message, I'm in agreement with DK's
> viewpoint. Member function are too special to be generic :-)

I was thinking about the case where someone has a hypothetical custom
container Foo with perhaps only an at(i) function. Then it is easier
to provide specializations for the set(), get() globals, just passing
a pointer to the container into the graph algorithm, compared to
creating a new class with operator[](), and then also wrapping the Foo
object at *every* call site.

Cheers,

Jeremy


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