vector/deque/list derived allocator issue
Dhruv Matani
dhruvbird@HotPOP.com
Thu Mar 25 10:36:00 GMT 2004
On Thu, 2004-03-25 at 11:10, B. Kosnik wrote:
> Hey Dhruv. Here's a patch for the testsuite that points out the issue
> you noticed with using a virtual clear member function in base class for
> certain STL sequences.
>
> Your patches for this problem are difficult to follow. Not the patch
> itself, or the reasoning, but the posts and repost and followups of just
> certain file diffs.
> The fact that I've taken so long to review this stuff certainly hasn't
> helped: for that, I apologize.
That's ok :-)
> Is there any chance you could give me a single patch for vector, deque,
> and list that fixes these testsuite failures?
It's attached with this message.
Also, this includes the patch for stl_tree and cpp_type_traits.
--
-Dhruv Matani.
http://www.geocities.com/dhruvbird/
Proud to be a Vegetarian.
http://www.vegetarianstarterkit.com/
http://www.vegkids.com/vegkids/index.html
-------------- next part --------------
2004-02-17 Dhruv Matani <dhruvbird@gmx.net>
* bits/cpp_type_traits.h: Changed __is_pod completely. Now, it
does not use any of the previous type_traits to detect the pod
types, and it also detects function pointers as POD types.
* bits/stl_tree.h: Introduced a new class _Rb_tree_impl, which
encapsulates the internal implementation of an rb_tree. Made
the allocator a base class of this class instead of the
rb_tree, which was not conforming. This _Rb_tree_impl class is
also specialized on whether the _Compare parameter is a POD
type or not. If so, then it maintains the comparison function
as a data member, otherwise it makes the _Compare parameter a
base class of itself. Also, _M_key_compare is now a function
instead of a data member, so that the above trick can work
properly. Delegated the initialization of the other data members to
this newly created class. Also, now other member functions of rb_tree
must refer to _M_key_compare as _M_impl._M_key_compare(). The
other data members (*) can be referenced to as _M_impl.(*), where
(*) includes _M_header, and _M_node_count.
2004-02-13 Dhruv Matani <dhruvbird@gmx.net>
* bits/stl_list.h: Created a _List_impl class and made it
derive from the allocator, instead of the list deriving from the
allocator class, which was not conformant. Changed all references
from this->_M_node to this->_M_impl._M_node
* bits/list.tcc: Same as above (changed all references to
the concerned variables).
2004-02-12 Dhruv Matani <dhruvbird@gmx.net>
* bits/stl_deque.h: Created a _Deque_impl class and made it
derive from the allocator, instead of the deque deriving from the
allocator class, which was not conformant. Changed all references
to the _M_start, _M_finish, _M_map, and _M_map_size to
_M_impl.*.
(_Deque_base<_Tp,_Alloc>::~_Deque_base()): Added this->
qualification in 2 places where it was missing.
(_Deque_base<_Tp,_Alloc>::_M_initialize_map(size_t)): Same as
above.
* bits/deque.tcc: Same as above (changed all references to
the concerned variables).
2004-02-10 Dhruv Matani <dhruvbird@gmx.net>
* bits/stl_vector.h: Created a _Vector_impl class and made it
derive from the allocator, instead of the _Vector_base class,
deriving from the allocator which was not conformant. Changed
all references to the _M_start, _M_finish, and
_M_end_of_storage to _M_impl.*.
* bits/vector.tcc: Same as above (changed all references to
the concerned variables).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch_containers.diff
Type: text/x-patch
Size: 119627 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040325/d7fe0ac0/attachment.bin>
More information about the Libstdc++
mailing list