|
Boost : |
From: Jason Hise (0xchaos_at_[hidden])
Date: 2006-10-03 09:07:33
For accessing members of a vector, I've found I prefer using an index
to access elements, with some special indicees predefined. This
sidesteps the problem of needing to directly access a member in order
to refer to a component by name. For instance:
vector<int, 2> vec;
vec[0] = 42;
vec[_x] = 42; // does the same thing
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk