In commit "proxy: fix BuildList to use non-const iteration for interface types" (a0b01d73698597293e48771cad2b4cb8e0ba16a0)
Note, while this change mostly restores behavior to what it was before #277, passing elem to BuildField below as an lvalue reference regardless of whether the container is lvalue or rvalue, it might make more sense to pass elem as an rvalue if the container is an rvalue, or as an lvalue if it's an lvalue with something like:
for (auto&& elem : value) {
if constexpr (std::is_lvalue_reference_v<Value&&>) {
BuildField(/*...*/, elem);
} else {
BuildField(/*...*/, std::move(elem));
}
}
This could be safer because it could allow BuildField to distinguish based on the way the container is being used and only move from temporary containers that are about to be destroyed, not containers passed as references.
Also it might be better to replace for (auto&& elem : value) with for (auto it = elem.begin(); it != elem.end(); ++it) like the previous code had since this would could also preserve rvaluedness of dereferencing the iterator, if the iterator deferences as a proxy object instead of a reference like vector<bool>`
Which is just to say that a0b01d73698597293e48771cad2b4cb8e0ba16a0 is a minimal change restoring ability to return lists of interface pointers, but it might make sense to actually increase safety here as well.