home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / std / cplus / 2099 < prev    next >
Encoding:
Internet Message Format  |  1993-01-21  |  1.6 KB

  1. Path: sparky!uunet!news.centerline.com!noc.near.net!hri.com!spool.mu.edu!olivea!charnel!sifon!thunder.mcrcim.mcgill.edu!sobeco!philmtl!vedge!hendrik
  2. From: hendrik@vedge.com (Hendrik Boom)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: pointer comparisons
  5. Message-ID: <1993Jan20.173927.3061@vedge.com>
  6. Date: 20 Jan 93 17:39:27 GMT
  7. References: <1993Jan18.182452.15390@lpi.liant.com>
  8. Organization: Visual Edge Software Ltd.
  9. Lines: 23
  10.  
  11. pkt@lpi.liant.com (Scott Turner) writes:
  12. : In article <1393@pivot-sts.sbi.com>, linke@kirin (User - Bill Linke) writes:
  13. : > In article <1993Jan11.190959.5305@lpi.liant.com>, pkt@lpi.liant.com (Scott Turner) writes:
  14. : > > If we have objects of a type which requires no state, e.g.
  15. : > >        struct B{} a, b;
  16. : > > then in order for them to have distinct identities an implementation
  17. : > > might allocate addresses that don't point to valid memory.  Again, no
  18. : > > storage is required.
  19.  
  20. (Not quite a quote -- I named the struct 'B' so I could talk about it.)
  21. There's no problem with allocating no storage for struct B, and using
  22. addresses into deep space or real space to point to B's. Even if user code
  23. dereferences it or copies it this can be done with no action.
  24. But it nonempty class C inherits from B, you have trouble comparing
  25. pointers to B with pointers to C that have been converted to B,
  26. unless you are careful that addresses of B's are outside of usable
  27. memory.
  28. -- 
  29. -------------------------------------------------------
  30. Try one or more of the following addresses to reply.
  31. at work:    hendrik@vedge.com,  iros1!vedge!hendrik
  32. at home:    uunet!ozrout!topoi!hendrik
  33.