www.delorie.com/archives/browse.cgi | search |
Haojun Bao wrote: > 215 path_conv &operator =(path_conv& pc) > 216 { > 217 memcpy (this, &pc, sizeof pc); Ow yuck! I very much hope nobody ever creates derived classes of path_conv that introduce virtual functions into the base class, or we're going to have a very tricky to find bug here. (Hmm, now there's an idea. GCC needs an __attribute__ that you can tag onto a class to say it must be a POD-type and get a compiler error if anyone ever adds a virtual function or anything else that would make the layout non-POD.) cheers, DaveK -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |