------- Additional Comments From rguenth at tat dot physik dot uni-tuebingen dot de 2005-01-12 16:24 ------- Or stuff often found in C++ libraries:
template <int Dim> struct Vector { Vector(float init) { for (int i=0; i<Dim; ++i) v[i] = init; } float v[Dim]; }; for small Dim (<= 4 should make nearly everyone happy) you want all the dimension-unaware loops to be unrolled. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19401