30 Apr
2008
30 Apr
'08
8:21 a.m.
Hi all I'm wondering if there is such stuff in boost, or anything similar: double d0, d1, d2, d3; boost::array<double &, 4> array = {{d0, d1, d2, d3}}; for(int i=0; i<4; i++) array[i] = i; assert(d2 == 2); or double d0, d1, d2, d3; boost::array<double, 4> array; boost::bind(array[0], d0); boost::bind(array[1], d1); boost::bind(array[2], d2); boost::bind(array[3], d3); for(int i=0; i<4; i++) array[i] = i; assert(d2 == 2); Thanks Max