<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>http://groups.google.com/group/comp.lang.c++.moderated</id>
  <title type="text">comp.lang.c++.moderated Google Group</title>
  <subtitle type="text">
  Technical discussion of the C++ language. (Moderated)
  </subtitle>
  <link href="/group/comp.lang.c++.moderated/feed/atom_v1_0_msgs.xml" rel="self" title="comp.lang.c++.moderated feed"/>
  <updated>2009-11-24T05:57:20Z</updated>
  <generator uri="http://groups.google.com" version="1.99">Google Groups</generator>
  <entry>
  <author>
  <name>red floyd</name>
  <email>redfl...@gmail.com</email>
  </author>
  <updated>2009-11-24T05:52:48Z</updated>
  <id>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/83021dcde337a15c/04bef21cd5a15e9f?show_docid=04bef21cd5a15e9f</id>
  <link href="http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/83021dcde337a15c/04bef21cd5a15e9f?show_docid=04bef21cd5a15e9f"/>
  <title type="text">Re: Fastest way to parse strings from a very big file!</title>
  <summary type="html" xml:space="preserve">
  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
  </summary>
  </entry>
  <entry>
  <author>
  <name>Andrey Tarasevich</name>
  <email>andreytarasev...@hotmail.com</email>
  </author>
  <updated>2009-11-24T05:57:20Z</updated>
  <id>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/49b646e36b47c440/119a5d4fdbfb45d6?show_docid=119a5d4fdbfb45d6</id>
  <link href="http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/49b646e36b47c440/119a5d4fdbfb45d6?show_docid=119a5d4fdbfb45d6"/>
  <title type="text">Re: (Inherited) Member access requires &quot;this&quot;</title>
  <summary type="html" xml:space="preserve">
  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
  </summary>
  </entry>
  <entry>
  <author>
  <name>stork</name>
  <email>tbandrow...@treatyist.com</email>
  </author>
  <updated>2009-11-24T05:53:32Z</updated>
  <id>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/49b646e36b47c440/4384b7a77dcadb0d?show_docid=4384b7a77dcadb0d</id>
  <link href="http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/49b646e36b47c440/4384b7a77dcadb0d?show_docid=4384b7a77dcadb0d"/>
  <title type="text">Re: (Inherited) Member access requires &quot;this&quot;</title>
  <summary type="html" xml:space="preserve">
  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,
  </summary>
  </entry>
  <entry>
  <author>
  <name>Rune Allnor</name>
  <email>all...@tele.ntnu.no</email>
  </author>
  <updated>2009-11-24T05:51:40Z</updated>
  <id>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/7ee15b2107a4bd3b/74661b039a555f9d?show_docid=74661b039a555f9d</id>
  <link href="http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/7ee15b2107a4bd3b/74661b039a555f9d?show_docid=74661b039a555f9d"/>
  <title type="text">Re: Trying to come to terms with typecasting operators</title>
  <summary type="html" xml:space="preserve">
  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
  </summary>
  </entry>
  <entry>
  <author>
  <name>red floyd</name>
  <email>redfl...@gmail.com</email>
  </author>
  <updated>2009-11-24T05:52:28Z</updated>
  <id>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/49b646e36b47c440/bce2f517d5c156a2?show_docid=bce2f517d5c156a2</id>
  <link href="http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/49b646e36b47c440/bce2f517d5c156a2?show_docid=bce2f517d5c156a2"/>
  <title type="text">Re: (Inherited) Member access requires &quot;this&quot;</title>
  <summary type="html" xml:space="preserve">
  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.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Francis Glassborow</name>
  <email>francis.glassbo...@btinternet.com</email>
  </author>
  <updated>2009-11-24T05:53:10Z</updated>
  <id>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/7ee15b2107a4bd3b/5bf0c42121f55eb3?show_docid=5bf0c42121f55eb3</id>
  <link href="http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/7ee15b2107a4bd3b/5bf0c42121f55eb3?show_docid=5bf0c42121f55eb3"/>
  <title type="text">Re: Trying to come to terms with typecasting operators</title>
  <summary type="html" xml:space="preserve">
  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])
  </summary>
  </entry>
  <entry>
  <author>
  <name>Daniel Krügler</name>
  <email>daniel.krueg...@googlemail.com</email>
  </author>
  <updated>2009-11-24T05:50:19Z</updated>
  <id>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/7ee15b2107a4bd3b/6ba00fd54edae105?show_docid=6ba00fd54edae105</id>
  <link href="http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/7ee15b2107a4bd3b/6ba00fd54edae105?show_docid=6ba00fd54edae105"/>
  <title type="text">Re: Trying to come to terms with typecasting operators</title>
  <summary type="html" xml:space="preserve">
  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
  </summary>
  </entry>
  <entry>
  <author>
  <name>AnonMail2005@gmail.com</name>
  <email>anonmail2...@gmail.com</email>
  </author>
  <updated>2009-11-24T05:52:04Z</updated>
  <id>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/83021dcde337a15c/628bc331e48009b0?show_docid=628bc331e48009b0</id>
  <link href="http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/83021dcde337a15c/628bc331e48009b0?show_docid=628bc331e48009b0"/>
  <title type="text">Re: Fastest way to parse strings from a very big file!</title>
  <summary type="html" xml:space="preserve">
  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
  </summary>
  </entry>
  <entry>
  <author>
  <name>Paul Bibbings</name>
  <email>paul_bibbi...@googlemail.com</email>
  </author>
  <updated>2009-11-24T05:50:38Z</updated>
  <id>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/49b646e36b47c440/a7c428a9e6be2a0b?show_docid=a7c428a9e6be2a0b</id>
  <link href="http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/49b646e36b47c440/a7c428a9e6be2a0b?show_docid=a7c428a9e6be2a0b"/>
  <title type="text">Re: (Inherited) Member access requires &quot;this&quot;</title>
  <summary type="html" xml:space="preserve">
  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
  </summary>
  </entry>
  <entry>
  <author>
  <name>stork</name>
  <email>tbandrow...@treatyist.com</email>
  </author>
  <updated>2009-11-24T05:55:36Z</updated>
  <id>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/700e95d5317f7933/a016c647a4f0a7c1?show_docid=a016c647a4f0a7c1</id>
  <link href="http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/700e95d5317f7933/a016c647a4f0a7c1?show_docid=a016c647a4f0a7c1"/>
  <title type="text">Re: Memberwise copying?</title>
  <summary type="html" xml:space="preserve">
  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...
  </summary>
  </entry>
  <entry>
  <author>
  <name>stork</name>
  <email>tbandrow...@treatyist.com</email>
  </author>
  <updated>2009-11-24T05:54:32Z</updated>
  <id>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/83021dcde337a15c/373a423f277f2ec2?show_docid=373a423f277f2ec2</id>
  <link href="http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/83021dcde337a15c/373a423f277f2ec2?show_docid=373a423f277f2ec2"/>
  <title type="text">Re: Fastest way to parse strings from a very big file!</title>
  <summary type="html" xml:space="preserve">
  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
  </summary>
  </entry>
  <entry>
  <author>
  <name>Eric J. Holtman</name>
  <email>e...@ericholtman.com</email>
  </author>
  <updated>2009-11-24T05:40:21Z</updated>
  <id>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/aea0d9b7bd90eaea/d7a49a257ae99258?show_docid=d7a49a257ae99258</id>
  <link href="http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/aea0d9b7bd90eaea/d7a49a257ae99258?show_docid=d7a49a257ae99258"/>
  <title type="text">Re: Question on goto with try/catch</title>
  <summary type="html" xml:space="preserve">
  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;.
  </summary>
  </entry>
  <entry>
  <author>
  <name>n00m</name>
  <email>n...@narod.ru</email>
  </author>
  <updated>2009-11-24T05:41:34Z</updated>
  <id>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/fff4ce6c3fdfd2c6/331125a18fd11d0f?show_docid=331125a18fd11d0f</id>
  <link href="http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/fff4ce6c3fdfd2c6/331125a18fd11d0f?show_docid=331125a18fd11d0f"/>
  <title type="text">Re: removing from set - does it have to be so ugly?</title>
  <summary type="html" xml:space="preserve">
  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};
  </summary>
  </entry>
  <entry>
  <author>
  <name>Neil Butterworth</name>
  <email>nbutterworth1...@gmail.com</email>
  </author>
  <updated>2009-11-24T05:37:08Z</updated>
  <id>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/83021dcde337a15c/7e42435dadec6485?show_docid=7e42435dadec6485</id>
  <link href="http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/83021dcde337a15c/7e42435dadec6485?show_docid=7e42435dadec6485"/>
  <title type="text">Re: Fastest way to parse strings from a very big file!</title>
  <summary type="html" xml:space="preserve">
  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
  </summary>
  </entry>
  <entry>
  <author>
  <name>Daniel Krügler</name>
  <email>daniel.krueg...@googlemail.com</email>
  </author>
  <updated>2009-11-24T05:30:54Z</updated>
  <id>http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/700e95d5317f7933/dc2d84745db82955?show_docid=dc2d84745db82955</id>
  <link href="http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/700e95d5317f7933/dc2d84745db82955?show_docid=dc2d84745db82955"/>
  <title type="text">Re: Memberwise copying?</title>
  <summary type="html" xml:space="preserve">
  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
  </summary>
  </entry>
</feed>
