[Bug libstdc++/13864] stl_hastable.h Line 527

gdr at integrable-solutions dot net gcc-bugzilla@gcc.gnu.org
Mon Jan 26 14:41:00 GMT 2004


------- 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



More information about the Gcc-bugs mailing list