I was sure adding auto would work. I'm still sure it does in some cases, but can't try right now. I guess it depends on the type of foreach? If I understand foreach correctly, it uses either opApply() or the range static interface to do its job, and with a range interface "auto" does actually work?