RE: [GD-General] meaning of sizeof(int) on all plateform
Brought to you by:
vexxed72
From: Phil T. <ph...@mi...> - 2003-06-28 21:16:38
|
Actually pointer to member functions throw a wrench into this = discussion, specifically when forward declaring classes. There was a = thread on this in the software engineering list. =20 The example given was this: =20 class C; int (C::*pmf)(); C* p; =20 int n =3D (p->*pmf)(); =20 Note that the full declaration of the class C is not required for this = code to compile; however, the member function could be virtual/multiply = inherited/etc so the pointer has to encode this information. =20 On Win32 some compilers will generate this as a 16 byte pointer; others, = will generate stub code and return a pointer to that code which is then = a 4 byte pointer. VC 7 has some compiler options that let you choose = the behavior. =20 The point being that there are things that look like pointers but that = aren't the same size as other native pointers. =20 Phil =20 ________________________________ From: gam...@li... on behalf of = Daniel Vogel Sent: Sat 28.06.2003 12:54 To: gam...@li... Subject: RE: [GD-General] meaning of sizeof(int) on all plateform > I state that sizeof(T*) is the same, whatever T might be. Am I wrong? I'm not aware of any implementation where this is not the case though the standard doesn't guarantee it. -- Daniel, Epic Games Inc. ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 _______________________________________________ Gamedevlists-general mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-general Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=3D557 |