This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Bug in std::vector?
- From: Dmitriy Morozov <gcc at foxcub dot org>
- To: gcc-bugs at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Fri, 14 Mar 2003 17:54:57 -0500
- Subject: Bug in std::vector?
Hi,
In .../bits/stl_vector.h, in class vector<_Tp, _Alloc>, there is a
typedef value_type* pointer;
while it really should be something like
typedef allocator_type::pointer pointer;
This is just an example, this problem (of assuming that _Tp* is the
pointer to element type) arises throughout the whole vector hierarchy
(and I'm sure appears for other containers as well), and ignores the
fact that one could provide his own pointer type in the allocator. Am
I missing something here, or is this indeed a bug? If I am missing
something, can you, please, explain to me what? If this is a bug, are
there any plans to fix it, and are there any suggested workarounds,
which I cannot imagine there being many, but, nevertheless, it can't
hurt to ask. Basically, can you comment on the issue?
Thanks,
Dmitriy
--
Dmitriy Morozov