
Hi, If we look into sandbox/shifted_ptr/bits I've added an archive called "bits.zip". I archived it because of all the barking SVN was doing. By unpacking this file we'll find: stl_list.h list.tcc stl_list.h.patch list.tcc.patch These files are an overriden version of the Gnu Gcc's 3.4.x headers. Why Gcc's? Because SGI headers are outdated by many years. Now if we compile shifted_ptr_test2.cpp with the following then these headers will override system ones which is perfect: g++ shifted_ptr_test2.cpp -I ../../.. My example doesn't work anymore but compiles at least. I will work on the problem but for now we can see the required changes to make STL compliant with smart pointers in the patch files. I think this is great because this can help unobfusticate the standards in this matter and containers using smart pointers means better abstraction and goodbye to a lot of headaches if we start using sorting, multi-indexing, graph, etc. In the code itself I am propagating the allocator all over internal classes (iterators & nodes) and now looks like the following: template<typename _Alloc> struct _List_node_base { typedef typename _Alloc::template rebind<_List_node_base<_Alloc>
::other _Node_Alloc_type;
typedef typename _Node_Alloc_type::pointer pointer; typedef typename _Node_Alloc_type::const_pointer const_pointer; typedef typename _Node_Alloc_type::reference reference; typedef typename _Node_Alloc_type::const_reference const_reference; pointer _M_next; ///< Self-explanatory pointer _M_prev; ///< Self-explanatory static void swap(_List_node_base& __x, _List_node_base& __y); void transfer(pointer const __first, pointer const __last); void reverse(); void hook(pointer const & __position); void unhook(); }; Furtermore I took the liberty of mixing the Boost License with GPL because I think these are compatible but feel free letting me know any problem this may create. Regards, -Phil

Phil Bouchard wrote:
Hi,
If we look into sandbox/shifted_ptr/bits I've added an archive called "bits.zip". I archived it because of all the barking SVN was doing. By unpacking this file we'll find: stl_list.h list.tcc stl_list.h.patch list.tcc.patch
These files are an overriden version of the Gnu Gcc's 3.4.x headers.
Why not propose that patch (or rather, a patch against a recent version of GCC) for inclusion in GCC?

"Mathias Gaunard" <mathias.gaunard@ens-lyon.org> wrote in message news:g621hf$ug6$1@ger.gmane.org... [...]
Why not propose that patch (or rather, a patch against a recent version of GCC) for inclusion in GCC?
Ok I just did... I have adjusted some files also in my Sandbox. I get a success on the first test but the second one cause a segmentation violation. I'll dig deeper this week. -Phil

"Phil Bouchard" <philippe@fornux.com> wrote in message news:g64al7$orm$1@ger.gmane.org...
"Mathias Gaunard" <mathias.gaunard@ens-lyon.org> wrote in message news:g621hf$ug6$1@ger.gmane.org...
Why not propose that patch (or rather, a patch against a recent version of GCC) for inclusion in GCC?
Ok I just did...
[...] It turns out we were 2 people having the same idea nearly at the same time. -Phil
participants (2)
-
Mathias Gaunard
-
Phil Bouchard