[prev in list] [next in list] [prev in thread] [next in thread]
List: boost
Subject: Re: [boost] tie alternative?
From: "Andrew Sutton" <andrew.n.sutton () gmail ! com>
Date: 2008-10-30 14:23:08
Message-ID: ab7a64130810300723m55b128e3h5fb9aea0e736ebd2 () mail ! gmail ! com
[Download RAW message or body]
>
> 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@gmail.com
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic