I think the range-based for-loops are not supported by IBM XLC.