managed to compile generated code with c++0x
FOREACH!!!!