for ( init-statement for-range-declaration : for-range-initializer ) statementis equivalent to
{ init-statement auto &&range = for-range-initializer ; auto begin = begin-expr ; auto end = end-expr ; for ( ; begin != end; ++begin ) { for-range-declaration = * begin ; statement } }where
int array[5] = { 1, 2, 3, 4, 5 }; for (int& x : array) x *= 2;— end example