According to [sequence.reqmts], a.assign_range(rg) has the Mandates of assignable_from<T&, ranges::range_reference_t<R>> s modeled, however, this is missed in the MSVC-STL implementation.
The following should be rejected:
#include <vector>
struct Int {
void operator=(int);
Int(int);
};
int main() {
std::vector<Int> v;
v.assign_range(std::vector{42}); // only libstdc++ rejects
}
https://godbolt.org/z/TrGsbcndj
Not sure if other containers have similar issues.
According to [sequence.reqmts],
a.assign_range(rg)has the Mandates ofassignable_from<T&, ranges::range_reference_t<R>>s modeled, however, this is missed in the MSVC-STL implementation.The following should be rejected:
https://godbolt.org/z/TrGsbcndj
Not sure if other containers have similar issues.