struct R { int front() { return 1; } } void main(string[] args) { foreach (arg; args) { arg. } R r; foreach (i; r) { i. } }