const auto v0 = vector<int>{}; const auto v1 = v0.push_back(15); const auto v2 = v1.push_back(16); const auto v3 = v2.set(0, 42); assert( v2.size() == v0.size() + 2 && v3[0] - v1[0] == 27);
one with all methodsmarked const
old values are preserved