Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!mcgill-vision!snorkelwacker!usc!samsung!uunet!pyrdc!netxcom!ewiles From: ewiles@netxcom.DHL.COM (Edwin Wiles) Newsgroups: comp.std.c++ Subject: Re: "packed" objects (Oops! Forgot something!) Message-ID: <6786@netxcom.DHL.COM> Date: 31 Jul 90 18:12:53 GMT References: <56159@microsoft.UUCP> <56165@microsoft.UUCP> <6785@netxcom.DHL.COM> Organization: NetExpress Communications Inc,. Vienna, VA. Lines: 14 In article <56165@microsoft.UUCP> jimad@microsoft.UUCP (Jim ADCOCK) writes: >* Introduce an explicit keyword "packed" or similar. Declaring a base class >"packed" turns off field ordering restrictions in that class and its >derivatives, as well as representing a directive to the compiler that small >size is to be preferred to fast access. Possibly vtable ptrs could also >be replaced with smaller type tags in such classes.... Any derivative that uses a 'packed' class, but is not itself packed should be flagged in the compiler with at least a warning message. The user of the base class might not realize that it was packed! In fact, you might declare such useage an error and REQUIRE the user to explicitly mark the new class as packed. [disclaimer: this posting respresents the opinions of an individual C++ user]