This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/29286] [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should



------- Comment #44 from pcarlini at suse dot de  2007-05-04 12:07 -------
(In reply to comment #43)
> (By the way, someone should tell the tramp3d developers that using placement
> new for a POD type like double isn't a very smart idea ;) The only tricky point
> for default inizialization is whether using memset or a plain loop)

Forgot to add a detail that may be of interest, however: C++03 *fails* to
classify as POD some very common and simple types which are morally PODs:

  http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2172.html

Thus let's not assume users to be too good here: sometimes, in generic code,
they may end-up calling placement new also for very simple types.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]