y1[i] and y2[i] are elements of writable integer vectors, and are of type cpp11::writable::r_vector::proxy. It appears that the equals operator for this type has been defined in two places:
r_vector.hpp line 241: proxy& operator=(const T& rhs);
integers.hpp line 59: inline typename r_vector<int>::proxy& r_vector<int>::proxy::operator=(const int& rhs)
As the answer to my StackOverflow question says.
This example shows that the documentation could be improved.
Taking from SamR's answer:
y1[i]
andy2[i]
are elements of writable integer vectors, and are of type cpp11::writable::r_vectorproxy& operator=(const T& rhs);
inline typename r_vector<int>::proxy& r_vector<int>::proxy::operator=(const int& rhs)