I wanted to do this
#include <vector> #include <span> struct S { std::vector<int> v; void set(std::span<int> _v) { v = _v; } };
But it does not compile. What are the alternatives?
v.assign(_v.begin(), _v.end());