If I, for example, have a vector v, is this normal by standard:
void setData(const uint8_t* p, size_t s) {
v.assign(p, p+s);
}
setData(nullptr, 0);
In general, it is always normal to call STL functions XXX(InputIterator first, InputIterator last), as described above, when distance(first,last) == 0?
source
share