empty slices: defined?
Gabriel Dos Reis
gdr@integrable-solutions.net
Mon Nov 7 23:37:00 GMT 2005
DJ Delorie <dj@redhat.com> writes:
| > The way *I* see it is that slices are implementation detail helper
| > function/classes for selecting subsets of value arrays. *My* view is that
| > the default constructors are allowed so that one can put them in
| > vectors or arrays, e.g.
| >
| >
| > std::slices ix[N];
| >
| > and assign to them.
|
| Right, but consider... there are two types of slices (slice and
| gslice). *One* of them says that you can only use the default
| constructor for the above case. The *other* one does not. "There
| must be a reason why they're documented differently."
And the reason could be mere oversight -- so far, no one on LWG has
explained why they were documented differently.
| > For (2), I'm open to anything that does not introduce more checks.
|
| The two patches would be trivial, but both add some overhead:
Thanks for this initial analysis.
-- Gaby
More information about the Libstdc++
mailing list