Beginnings of std:forward_list
3dw4rd@verizon.net
3dw4rd@verizon.net
Sat Aug 30 18:16:00 GMT 2008
Hi,
Here are the beginnings of an implementation of the C++-0x container std::forward_list.
I used the libstdc++ implementations of std::list and ext/slist for guidance.
Notes:
1. This is not a patch yet because I'm not sure where to put it.
I also don't have test cases (although I have a toy test driver).
2. I'm not sure I got the allocator technology right.
This area is new to me.
3. There are const_cast uses that bug me.
The forward_list standard requires const_iterator arguments
for erase_after and other things but I still need to manipulate stuff.
The attachments are forward_list which is uglified and hopefully
not too far off the mark. The forward_list.tcc has longish
implementations in it. Probably more should be moved from forward_list
to forward_list.tcc in future. Finally, there is a driver
test_forward_list.cpp which runs everything and prints results.
Thanks,
Ed Smith-Rowland
-------------- next part --------------
A non-text attachment was scrubbed...
Name: forward_list
Type: application/octet-stream
Size: 49875 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20080830/3982286b/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: forward_list.tcc
Type: application/octet-stream
Size: 4896 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20080830/3982286b/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_forward_list.cpp
Type: application/octet-stream
Size: 13596 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20080830/3982286b/attachment-0002.obj>
More information about the Libstdc++
mailing list