https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86015

--- Comment #12 from Josh Marshall <joshua.r.marshall.1991 at gmail dot com> ---
I can now say why this bothers me from a design perspective.  If the
requirement you are giving is correct, then the distance_type template
parameter must always be signed and always describe the distance between any
two points in memory and therefore must be of the base type ssize_t.  But if it
must always resolve to this one specific type, it doesn't make sense to have it
as a template parameterization. But having the more flexible definition and
usage can start to allow for user applications to do instrumentation and crazy
stuff like grid support through the stdlib one day.  It wouldn't make sense to
add the extra complexity to always use ssize_t, and so it doesn't make sense
that difference_type must be a signed integer only.  It doesn't fit with any
source I've found, it doesn't explain the added complexity in the template, and
it reduces flexibility and generalizability.

Reply via email to