<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>C++ implementations (virtual methods in constructor OK?) - C++ - tribe.net</title>
    <link>http://cpp.tribe.net/thread/301c4b47-8eb1-48c7-b265-e77bccb108ab?format=rss</link>
    <description>Tribe.net. Local Connections</description>
    <item>
      <title>C++ implementations (virtual methods in constructor OK?)</title>
      <link>http://CPP.tribe.net/thread/301c4b47-8eb1-48c7-b265-e77bccb108ab#ae996112-cc1f-46b5-8c4c-39285eeba3df</link>
      <description>A couple years ago, a friend of mine who's a fellow C++ geek mentioned that virtual methods should not be invoked from a constructor because it's unknown whether a given C++ implementation initializes a class's virtual table before or after its constructor is invoked.&#xD;
&#xD;
This isn't an issue with the C++ version I've worked with (Microsoft's Visual Studio C++) but I'm wondering whether anyone here has run into an implementation where it IS an issue.  I haven't checked g++ yet...&#xD;
&#xD;
Best, Don</description>
      <pubDate>Mon, 15 Mar 2004 17:34:09 GMT</pubDate>
      <guid isPermaLink="false">http://CPP.tribe.net/thread/301c4b47-8eb1-48c7-b265-e77bccb108ab#ae996112-cc1f-46b5-8c4c-39285eeba3df</guid>
      <dc:creator>Genghis "Doh!"</dc:creator>
      <dc:date>2004-03-15T17:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: C++ implementations (virtual methods in constructor OK?)</title>
      <link>http://CPP.tribe.net/thread/301c4b47-8eb1-48c7-b265-e77bccb108ab#718641ca-05a3-41e9-9a73-31da90ba151e</link>
      <description>Your geek friend was right. Never call virtual functions from a constructor or a destructor. During construction and destruction the vtables are switched (they must be, if you think about it). It's part of the C++ Standard.</description>
      <pubDate>Mon, 15 Mar 2004 22:29:31 GMT</pubDate>
      <guid isPermaLink="false">http://CPP.tribe.net/thread/301c4b47-8eb1-48c7-b265-e77bccb108ab#718641ca-05a3-41e9-9a73-31da90ba151e</guid>
      <dc:creator>Bartosz</dc:creator>
      <dc:date>2004-03-15T22:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: C++ implementations (virtual methods in constructor OK?)</title>
      <link>http://CPP.tribe.net/thread/301c4b47-8eb1-48c7-b265-e77bccb108ab#dc7b4020-ecfb-41d2-8844-066682f6217b</link>
      <description>Suggest a good book that would help me master C++ with this level of knowledge?</description>
      <pubDate>Thu, 18 Mar 2004 21:18:44 GMT</pubDate>
      <guid isPermaLink="false">http://CPP.tribe.net/thread/301c4b47-8eb1-48c7-b265-e77bccb108ab#dc7b4020-ecfb-41d2-8844-066682f6217b</guid>
      <dc:creator>Genghis "Doh!"</dc:creator>
      <dc:date>2004-03-18T21:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: C++ implementations (virtual methods in constructor OK?)</title>
      <link>http://CPP.tribe.net/thread/301c4b47-8eb1-48c7-b265-e77bccb108ab#4fe07c21-241b-41f4-b39b-2970a6eb4b23</link>
      <description>Have a look at my book "C++ In Action" online at http://www.relisoft.com/book . If you like it, you can buy one used for less than $10 (there's a link there).</description>
      <pubDate>Tue, 23 Mar 2004 23:37:40 GMT</pubDate>
      <guid isPermaLink="false">http://CPP.tribe.net/thread/301c4b47-8eb1-48c7-b265-e77bccb108ab#4fe07c21-241b-41f4-b39b-2970a6eb4b23</guid>
      <dc:creator>Bartosz</dc:creator>
      <dc:date>2004-03-23T23:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: C++ implementations (virtual methods in constructor OK?)</title>
      <link>http://CPP.tribe.net/thread/301c4b47-8eb1-48c7-b265-e77bccb108ab#8dc41a64-9c35-44fe-8c07-f7412fb23abd</link>
      <description>VERY cool!  Thanks for the tip!</description>
      <pubDate>Tue, 23 Mar 2004 23:40:47 GMT</pubDate>
      <guid isPermaLink="false">http://CPP.tribe.net/thread/301c4b47-8eb1-48c7-b265-e77bccb108ab#8dc41a64-9c35-44fe-8c07-f7412fb23abd</guid>
      <dc:creator>Genghis "Doh!"</dc:creator>
      <dc:date>2004-03-23T23:40:47Z</dc:date>
    </item>
  </channel>
</rss>



