This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: empty slices: defined?


Ah, yes, I misunderstood what you were trying to figure out.  I don't
know the answer, because I don't understand the mechanics of the
behind-the-scenes bits well enough.  I suspect the easiest solution is
to note for gslice the same restriction slice notes for the default
constructor.

It would be nice if the constructors at least left the object in a
state such that segfaults could happen because of the initialization,
but then again, regular C pointer segfault if you use the "default"
constructor (i.e. don't set them).

But... why do we check everywhere else then?

/me wonders if it would benefit the user to initialize _M_index to
(void *)(~0) instead of NULL and force an obvious core dump as soon as
possible.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]