Boost logo

Boost :

Subject: Re: [boost] tie alternative?
From: Andrew Sutton (andrew.n.sutton_at_[hidden])
Date: 2008-10-30 10:23:08


>
> However, we can make it much nicer, e.g.:
>
> for (vertex_iterator pv,ve = xxx(pv,vertices(g)); pv != ve; ++pv)
> {
> ...
> }
>
> My only problem is how to spell xxx. The attached proof-of-concept uses
> operator%, but I don't feel particularly good about that choice either.
> Ideas?
>

Should the operation generalize? Would this also be a use case?

T a, b, c = xxx(a, b, f()); // with f() -> tuple<T,T,T>

If it is, I don't think that operator%() will give you the same results
(could your write c = a % b % f()?). As for a name, I like "truss" as in
"truss this result to these objects". Just a thought.

Andrew Sutton
andrew.n.sutton_at_[hidden]


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