
5 Oct
2007
5 Oct
'07
3:47 a.m.
"John Femiani" <JOHN.FEMIANI@asu.edu> writes:
What is not lightweight about the get<0>(pt) syntax? Doesn't it compile away? Is the issue a dependency on another library -- because the get<0>(pt) syntax seems really easy to provide without bothering with Fusion.
template <int Index> float get(MyPoint & p) {return p[Index];} template <> float get<0>(MyPoint & p) {return p.x;}
How does this work with non-constant indices? That's a significant reason why array-style access is useful ... -Miles -- "I distrust a research person who is always obviously busy on a task." --Robert Frosch, VP, GM Research