span has a partial class template specialization for when the extent
is dynamic. This leads to a lot of repeated code (for type aliases,
constraints on constructors, etc.) which is not ideal. It makes for more
of a maintenance burden as more things are added to span such as
current work I'm doing with P1394.
Refactor span to be just one class template and handle the few differences
between static and dynamic extents with appropriate constraints and
if constexpr where needed. Only store the extent data member when the extent
is dynamic. This ensures no additional storage overhead when the span has a
static extent.
I don't think it changes anything, but I'd like to have a confirmation here from anyone knowing better the standardese. Does it change anything to have explicitly defaulted destructor vs. implicitly defaulted one?