4 Dec
2019
4 Dec
'19
3:24 p.m.
I would hope to see close to the same semantics as std::array
, which I believe allows data() to return nullptr.
I don't think so: "There is a special case for a zero-length array (|N == 0|). In that case, array.begin() == array.end(), which is some unique value. The effect of calling front() or back() on a zero-sized array is undefined." from https://en.cppreference.com/w/cpp/container/array IMO this excludes nullptr as that won't be unique