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: Extending Temporary buffer for rvalues


Hi,
> 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...

Paolo.


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