add specializations for foreach for const or non-const