This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/13864] stl_hastable.h Line 527
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jan 2004 14:41:55 -0000
- Subject: [Bug libstdc++/13864] stl_hastable.h Line 527
- References: <20040126054235.13864.greg.bertin@solacesystems.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gdr at integrable-solutions dot net 2004-01-26 14:41 -------
Subject: Re: stl_hastable.h Line 527
"greg dot bertin at solacesystems dot com" <gcc-bugzilla@gcc.gnu.org> writes:
| Allocators return uninitialized memory blocks. This is a problem because
| _Construct():
|
| template <class _T1, class _T2>
| inline void
| _Construct(_T1* __p, const _T2& __value)
| { new (static_cast<void*>(__p)) _T1(__value); }
|
| assumes that __p points to a properly initialized T1 object since it
| invokes T1's copy constructor.
No, it does not. Please look up "new with placement" in a any decent
book on C++.
The PR is invalid. It is user confusion.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13864