forward_list question
Jonathan Wakely
jwakely.gcc@gmail.com
Tue Oct 30 22:24:00 GMT 2012
On 30 October 2012 22:11, Daniel Krügler <daniel.kruegler@gmail.com> wrote:
> 2012/10/30 Jonathan Wakely <jwakely.gcc@gmail.com>:
>> Hi Ed,
>>
>> Your forward_list patch in
>> http://gcc.gnu.org/ml/libstdc++/2008-10/msg00053.html includes the
>> comment:
>>
>> + * First, we never actually allocate a Tp, we allocate
>> + * Fwd_list_node<Tp>'s and trust [20.1.5]/4 to DTRT. This is to ensure
>>
>> Any idea which draft that standard reference was from? Because
>> whatever you were referring to is no longer at 20.1.5! I'e looked
>> through several drafts from 2008 and most don't even have a 20.1.5
>
> My immediate reaction was that this must have been
>
> 20.1.5 Allocator requirements [lib.allocator.requirements] p4
>
> from C++03:
>
> "Implementations of containers described in this International
> Standard are permitted to assume that their
> Allocator template parameter meets the following two additional
> requirements beyond those in Table 32. [..] "
Doh, I didn't even think to go back to C++03! Thanks, Daniel.
So the comment should be removed, and I'll carefully check the code
for invalid assumptions of equal allocators (which is what I was
already doing when I spotted the comment.)
More information about the Libstdc++
mailing list