Option to use boost foreach