This is the mail archive of the
mailing list for the libstdc++ project.
Re: Extending Temporary buffer for rvalues
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: Christopher Jefferson <caj at cs dot st-andrews dot ac dot uk>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Thu, 27 Aug 2009 11:52:31 +0200
- Subject: Re: Extending Temporary buffer for rvalues
- References: <submission.1MgJDT-0000UK-Qc@mail.cs.st-andrews.ac.uk>
> I wanted to post this patch separate from my other work, as it might
> be controversial (but hopefully isn't).
Frankly, I think we should instead take the occasion to revisit this
_Temporary_buffer idea, as indeed you pointed out earlier. I'm not
saying we should do away with it, or drastically simplify it, but, for
example, I never really, fully understood why we should fill with
*__first instead of something else, what's so special about it? As far
as I can see, *__first works now as a sort of replacement for
value_type(), just because we can't assume default constructible. Also,
from the correctness point of view, I'm nor convinced that /moving/
*__first is always correct: after the construction of _Temporary_buffer
__first is passed around in the algorithms and thus apparently assumed
meaningful. To be honest I also don't like the nested try / catch would
be the only case in the whole library, I think. All in all, I think we
should see things in a different way...