<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rss version="2.0">
  <channel>
  <title>comp.lang.c++.moderated Google Group</title>
  <link>http://groups.google.com/group/comp.lang.c++.moderated</link>
  <description>Technical discussion of the C++ language. (Moderated)</description>
  <language>en</language>
  <item>
  <title>Re: Fastest way to parse strings from a very big file!</title>
  <link>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/83021dcde337a15c/04bef21cd5a15e9f?show_docid=04bef21cd5a15e9f</link>
  <description>
  Get the code correct first, and then worry about &amp;quot;efficiency&amp;quot;. And &lt;br&gt; BENCHMARK BENCHMARK BENCHMARK before you do &amp;quot;efficiency&amp;quot; tweaks. &lt;br&gt; I&#39;d use your first method -- read line by line into a std::string. &lt;br&gt; If benchmarking/profiling then shows that 1) you&#39;re too slow, and 2) &lt;br&gt; the &lt;br&gt; bottleneck is in the parsing; then -- and ONLY THEN -- should you look
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/83021dcde337a15c/04bef21cd5a15e9f?show_docid=04bef21cd5a15e9f</guid>
  <author>
  redfl...@gmail.com
  (red floyd)
  </author>
  <pubDate>Tue, 24 Nov 2009 05:52:48 UT
</pubDate>
  </item>
  <item>
  <title>Re: (Inherited) Member access requires &quot;this&quot;</title>
  <link>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/49b646e36b47c440/119a5d4fdbfb45d6?show_docid=119a5d4fdbfb45d6</link>
  <description>
  This will not compile with _any_ compiler. You don&#39;t have any &#39;m_p&#39; &lt;br&gt; declared anywhere. Your &#39;forward1&#39; has a member named &#39;p&#39;, not &#39;m_p&#39;. &lt;br&gt; Apparently, you were compiling something different with GCC. In any &lt;br&gt; case, try posting more or less _real_ code. &lt;br&gt; The reason for this is that the inner class &#39;forward1&#39; is actually just
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/49b646e36b47c440/119a5d4fdbfb45d6?show_docid=119a5d4fdbfb45d6</guid>
  <author>
  andreytarasev...@hotmail.com
  (Andrey Tarasevich)
  </author>
  <pubDate>Tue, 24 Nov 2009 05:57:20 UT
</pubDate>
  </item>
  <item>
  <title>Re: (Inherited) Member access requires &quot;this&quot;</title>
  <link>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/49b646e36b47c440/4384b7a77dcadb0d?show_docid=4384b7a77dcadb0d</link>
  <description>
  Microsoft&#39;s behavior is actually wrong and GCC&#39;s is right. I can&#39;t &lt;br&gt; remember the exact details but there is actually an edge case where &lt;br&gt; the compiler actually cannot know the right thing to do and so &lt;br&gt; Microsoft makes an assumption that is unwarranted in the general &lt;br&gt; case. As a rule, GCC is going to go more by the standard exactly,
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/49b646e36b47c440/4384b7a77dcadb0d?show_docid=4384b7a77dcadb0d</guid>
  <author>
  tbandrow...@treatyist.com
  (stork)
  </author>
  <pubDate>Tue, 24 Nov 2009 05:53:32 UT
</pubDate>
  </item>
  <item>
  <title>Re: Trying to come to terms with typecasting operators</title>
  <link>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/7ee15b2107a4bd3b/74661b039a555f9d?show_docid=74661b039a555f9d</link>
  <description>
  Hm. &lt;br&gt; Wrote the code and the post in parallel, so I lost the &lt;br&gt; point first time around. &lt;br&gt; In the code below is the test using reinterpret_cast&amp;lt;&amp;gt; &lt;br&gt; added, along with the corresponding added output. &lt;br&gt; As can be seen, each char value is preceeded by a number &lt;br&gt; of leading zeros that I am unable to get rid of. I assume
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/7ee15b2107a4bd3b/74661b039a555f9d?show_docid=74661b039a555f9d</guid>
  <author>
  all...@tele.ntnu.no
  (Rune Allnor)
  </author>
  <pubDate>Tue, 24 Nov 2009 05:51:40 UT
</pubDate>
  </item>
  <item>
  <title>Re: (Inherited) Member access requires &quot;this&quot;</title>
  <link>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/49b646e36b47c440/bce2f517d5c156a2?show_docid=bce2f517d5c156a2</link>
  <description>
  See FAQ 35.19 &lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://parashift.com/c++-faq-lite/templates.html#faq-35.19&quot;&gt;[link]&lt;/a&gt; &lt;br&gt; Basically, because forward1 is a member of a template, it becomes a &lt;br&gt; dependent base &lt;br&gt; class. You need to use one of the two constructs you&#39;ve already &lt;br&gt; found.
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/49b646e36b47c440/bce2f517d5c156a2?show_docid=bce2f517d5c156a2</guid>
  <author>
  redfl...@gmail.com
  (red floyd)
  </author>
  <pubDate>Tue, 24 Nov 2009 05:52:28 UT
</pubDate>
  </item>
  <item>
  <title>Re: Trying to come to terms with typecasting operators</title>
  <link>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/7ee15b2107a4bd3b/5bf0c42121f55eb3?show_docid=5bf0c42121f55eb3</link>
  <description>
  What has memory footprint got to do with static_cast&amp;lt;&amp;gt; ? &lt;br&gt; int main() { &lt;br&gt; // Hex values of digits: 0 1 2 3 &lt;br&gt; unsigned char c[] = {0x30,0x31,0x32,0x33}; &lt;br&gt; std::cout &amp;lt;&amp;lt; &amp;quot;Using static_cast&amp;lt;&amp;gt; &amp;quot; &amp;lt;&amp;lt; std::endl; &lt;br&gt; for (size_t n = 0; n != 4; ++n) { &lt;br&gt; std::cout &amp;lt;&amp;lt; std::hex &amp;lt;&amp;lt; static_cast&amp;lt;unsigned int&amp;gt; (c[n])
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/7ee15b2107a4bd3b/5bf0c42121f55eb3?show_docid=5bf0c42121f55eb3</guid>
  <author>
  francis.glassbo...@btinternet.com
  (Francis Glassborow)
  </author>
  <pubDate>Tue, 24 Nov 2009 05:53:10 UT
</pubDate>
  </item>
  <item>
  <title>Re: Trying to come to terms with typecasting operators</title>
  <link>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/7ee15b2107a4bd3b/6ba00fd54edae105?show_docid=6ba00fd54edae105</link>
  <description>
  Yes, this is intended behavior. &lt;br&gt; So, why not using a static_cast then? &lt;br&gt; No. What is your hesitation about a static_cast? You could &lt;br&gt; also simply rely on implicit conversion with a very tiny helper &lt;br&gt; function: &lt;br&gt; inline int to_int(char c) { return c; } &lt;br&gt; You could also easily define your own IO manipulator, which
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/7ee15b2107a4bd3b/6ba00fd54edae105?show_docid=6ba00fd54edae105</guid>
  <author>
  daniel.krueg...@googlemail.com
  (Daniel Krügler)
  </author>
  <pubDate>Tue, 24 Nov 2009 05:50:19 UT
</pubDate>
  </item>
  <item>
  <title>Re: Fastest way to parse strings from a very big file!</title>
  <link>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/83021dcde337a15c/628bc331e48009b0?show_docid=628bc331e48009b0</link>
  <description>
  I suggest using std::string.getline() to read a line into a &lt;br&gt; std::string from an istream and then parse the string into fields. &lt;br&gt; Reading the entire file into a buffer uses more space than reading &lt;br&gt; line by line. Also, you will be able catch lines errors such as wrong &lt;br&gt; number of fields this way. Reading the entire file at once won&#39;t
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/83021dcde337a15c/628bc331e48009b0?show_docid=628bc331e48009b0</guid>
  <author>
  anonmail2...@gmail.com
  (AnonMail2005@gmail.com)
  </author>
  <pubDate>Tue, 24 Nov 2009 05:52:04 UT
</pubDate>
  </item>
  <item>
  <title>Re: (Inherited) Member access requires &quot;this&quot;</title>
  <link>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/49b646e36b47c440/a7c428a9e6be2a0b?show_docid=a7c428a9e6be2a0b</link>
  <description>
  The clue here is that everything compiles fine in gcc also if you remove the &lt;br&gt; template&amp;lt;class T&amp;gt; on class outer. It has everything to do with dependant names &lt;br&gt; and thus the rules of &amp;quot;dependent name lookup.&amp;quot; Note that gcc is compiling this &lt;br&gt; correctly here, and you will see the same failure of your code if you pass it
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/49b646e36b47c440/a7c428a9e6be2a0b?show_docid=a7c428a9e6be2a0b</guid>
  <author>
  paul_bibbi...@googlemail.com
  (Paul Bibbings)
  </author>
  <pubDate>Tue, 24 Nov 2009 05:50:38 UT
</pubDate>
  </item>
  <item>
  <title>Re: Memberwise copying?</title>
  <link>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/700e95d5317f7933/a016c647a4f0a7c1?show_docid=a016c647a4f0a7c1</link>
  <description>
  Borland Turbo C++, Microsoft Visual C++ starting at 1.5, 1992-1995... &lt;br&gt; probably a Visual C++ bug that I&#39;ve just remembered...
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/700e95d5317f7933/a016c647a4f0a7c1?show_docid=a016c647a4f0a7c1</guid>
  <author>
  tbandrow...@treatyist.com
  (stork)
  </author>
  <pubDate>Tue, 24 Nov 2009 05:55:36 UT
</pubDate>
  </item>
  <item>
  <title>Re: Fastest way to parse strings from a very big file!</title>
  <link>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/83021dcde337a15c/373a423f277f2ec2?show_docid=373a423f277f2ec2</link>
  <description>
  In your case I&#39;d probably just read the file line by line. I make my &lt;br&gt; case as follows. &lt;br&gt; 1) You probably wouldn&#39;t notice the optimization. 40,000 records &lt;br&gt; really isn&#39;t all that much data and whatever efficiency you might gain &lt;br&gt; from blobbing it up and trying to parse it all in RAM will be hard to &lt;br&gt; detect &lt;br&gt; 2) You may not get the optimization you think. The object of blobbing
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/83021dcde337a15c/373a423f277f2ec2?show_docid=373a423f277f2ec2</guid>
  <author>
  tbandrow...@treatyist.com
  (stork)
  </author>
  <pubDate>Tue, 24 Nov 2009 05:54:32 UT
</pubDate>
  </item>
  <item>
  <title>Re: Question on goto with try/catch</title>
  <link>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/aea0d9b7bd90eaea/d7a49a257ae99258?show_docid=d7a49a257ae99258</link>
  <description>
  Nick Hounsome &amp;lt;nick.houns...@googlemail.com&amp;gt; wrote in &lt;br&gt; Oh, I know I can&#39;t do much there...... &lt;br&gt; mostly just wanted to hit the log to say &lt;br&gt; &amp;quot;can&#39;t happen trap&amp;quot;.
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/aea0d9b7bd90eaea/d7a49a257ae99258?show_docid=d7a49a257ae99258</guid>
  <author>
  e...@ericholtman.com
  (Eric J. Holtman)
  </author>
  <pubDate>Tue, 24 Nov 2009 05:40:21 UT
</pubDate>
  </item>
  <item>
  <title>Re: removing from set - does it have to be so ugly?</title>
  <link>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/fff4ce6c3fdfd2c6/331125a18fd11d0f?show_docid=331125a18fd11d0f</link>
  <description>
  Seems you are goddam right &lt;br&gt; but ouch I can&#39;t still tell the difference &lt;br&gt; and personally I&#39;d better use the commented method: &lt;br&gt; using namespace std; &lt;br&gt; void print(int elem) {cout &amp;lt;&amp;lt; elem &amp;lt;&amp;lt; endl;} &lt;br&gt; bool is_odd(int x) {return x % 2 != 0;} &lt;br&gt; int main() { &lt;br&gt; set&amp;lt;int&amp;gt; r; &lt;br&gt; int tmp[] = {0,1,-5,-3,8,3,2,4,5,6,7,8,9,1 1,22,44,55};
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/fff4ce6c3fdfd2c6/331125a18fd11d0f?show_docid=331125a18fd11d0f</guid>
  <author>
  n...@narod.ru
  (n00m)
  </author>
  <pubDate>Tue, 24 Nov 2009 05:41:34 UT
</pubDate>
  </item>
  <item>
  <title>Re: Fastest way to parse strings from a very big file!</title>
  <link>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/83021dcde337a15c/7e42435dadec6485?show_docid=7e42435dadec6485</link>
  <description>
  I answered a similar question to this on StackOverflow a while back &lt;br&gt; (which of course I can&#39;t find at the moment) by posting the results of &lt;br&gt; some tests I did that showed that reading into a large buffer was about &lt;br&gt; twice as fast as reading line by line into a string. You will have to &lt;br&gt; decide if a 2x increase in code speed (which isn&#39;t all that much) is
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/83021dcde337a15c/7e42435dadec6485?show_docid=7e42435dadec6485</guid>
  <author>
  nbutterworth1...@gmail.com
  (Neil Butterworth)
  </author>
  <pubDate>Tue, 24 Nov 2009 05:37:08 UT
</pubDate>
  </item>
  <item>
  <title>Re: Memberwise copying?</title>
  <link>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/700e95d5317f7933/dc2d84745db82955?show_docid=dc2d84745db82955</link>
  <description>
  Your assumptions as expressed literally are incorrect as long &lt;br&gt; as the original 1998 C++ standard has been published &lt;br&gt; (ISO/IEC 14882:1998(E)), but I don&#39;t know much about the pre- &lt;br&gt; standard era. The relevant quote here is 12.8 [class.copy]/8 &lt;br&gt; for the copy c&#39;tor: &lt;br&gt; &amp;quot;The implicitly defined copy constructor for class X performs a
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/700e95d5317f7933/dc2d84745db82955?show_docid=dc2d84745db82955</guid>
  <author>
  daniel.krueg...@googlemail.com
  (Daniel Krügler)
  </author>
  <pubDate>Tue, 24 Nov 2009 05:30:54 UT
</pubDate>
  </item>
  </channel>
</rss>
