std::vector v { 1, 2, 3 }; auto it = std::begin(v); assert(it != std::end(v)); int & ref = (*it); ref = 123; // ok, equivalent a (*it) = 123