<div class="gmail_quote">On Fri, Apr 3, 2009 at 3:02 PM, Robert Ramey <span dir="ltr"><<a href="mailto:ramey@rrsd.com">ramey@rrsd.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> <div bgcolor="#ffffff"> <div><font face="Arial" size="2"></font>�"Robert Dailey" <<a href="mailto:rcdailey@gmail.com" target="_blank">rcdailey@gmail.com</a>> wrote in message <a href="news:496954360904031054x3cb9f3cfldf1985695a096614@mail.gmail.com" target="_blank">news:496954360904031054x3cb9f3cfldf1985695a096614@mail.gmail.com</a>...</div><blockquote style="padding-right:0px;padding-left:5px;margin-left:5px;border-left:#000000 2px solid;margin-right:0px"> <div class="im">Also, I'm a bit confused about something else Robert. <div><br></div> <div>All along we've been saying that if the code in the translation unit is not used, it may be stripped by the linker. What code exactly is being stripped? I mean, I create my classes before I serialize them and I'm calling member functions on these instances. So for sure the translation unit is being "entered" before serialization even begins. Does this not meet the requirements?</div> <div>�</div> <div><font face="Arial" size="2"></font>�</div> </div><div><font face="Arial" size="2">I've been presuming your doing something like:</font></div> <div><font face="Arial" size="2"></font>�</div> <div><font face="Arial" size="2">base * b = new derived;</font></div> <div><font face="Arial" size="2">ar << b;</font></div> <div><font face="Arial" size="2"></font>�</div> <div><font face="Arial" size="2"></font>�</div> <div><font face="Arial" size="2">....</font></div> <div><font face="Arial" size="2">base * new_b;</font></div> <div><font face="Arial" size="2"></font>�</div> <div><font face="Arial" size="2">ar >> new_b; the linker look for the code to load derived.</font></div> <div><font face="Arial" size="2"></font>�</div> <div><font face="Arial" size="2">Robert Ramey</font></div></blockquote></div></blockquote><div>What exactly are you trying to say here? Are you saying that only when I stream in does the translation unit for "derived" get visited? Could you provide a bit more detail?</div> <div><br></div><div>What I'm doing is more like this:</div><div><br></div><div>base* b = new derived;</div><div>b->DoStuff();</div><div>b->DoMoreStuff();</div><div>archive << b;</div><div><br></div><div>I haven't actually used >> yet. This is strictly an issue with streaming out.</div> </div>