<?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.ca/group/comp.lang.c++.moderated</link>
  <description>Technical discussion of the C++ language. (Moderated)</description>
  <language>en</language>
  <item>
  <title>spoilt for choice: choosing the right container</title>
  <link>http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/935e50d86dfd13e4/c18c4bb7669c9756?show_docid=c18c4bb7669c9756</link>
  <description>
  Hi! &lt;br&gt; We have a row base visualization of data and we need a very fast &lt;br&gt; access to the data &lt;br&gt; and for updating the individual rows. &lt;br&gt; Using a sorted vector - initially - everything looks fine as long we &lt;br&gt; are not forced &lt;br&gt; to sort on each new added item. &lt;br&gt; Positive: &lt;br&gt; - &amp;quot;push_back&amp;quot; is fast &lt;br&gt; - &amp;quot;distance&amp;quot; is fast &lt;br&gt; - you can use &amp;quot;reserve&amp;quot;
  </description>
  <guid isPermaLink="true">http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/935e50d86dfd13e4/c18c4bb7669c9756?show_docid=c18c4bb7669c9756</guid>
  <author>
  t.lehm...@rtsgroup.net
  (Thomas Lehmann)
  </author>
  <pubDate>Mon, 23 Nov 2009 11:56:33 UT
</pubDate>
  </item>
  <item>
  <title>Re: istringstream constructor performance</title>
  <link>http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/f342a1d36b54deab/4a41f6f7b9a95d0e?show_docid=4a41f6f7b9a95d0e</link>
  <description>
  I realize the problem is with the constructor, but I wonder what is a &lt;br&gt; default istringstream (ISS) constructor/destructor doing that takes up &lt;br&gt; 35% of the total run. I would expect the ISS str method to take up a &lt;br&gt; big portion of the time, but not the default constructor. &lt;br&gt; As for optimization of my program, it is not too important here
  </description>
  <guid isPermaLink="true">http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/f342a1d36b54deab/4a41f6f7b9a95d0e?show_docid=4a41f6f7b9a95d0e</guid>
  <author>
  rickara...@comcast.net
  (RRick)
  </author>
  <pubDate>Mon, 23 Nov 2009 11:57:36 UT
</pubDate>
  </item>
  <item>
  <title>Variadic Templates - parralel_invoke</title>
  <link>http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/66c253a0a5872d4f/1c9c2b22ba5fb6ea?show_docid=1c9c2b22ba5fb6ea</link>
  <description>
  Given the code below (excerpt from ppl.h in VS2010 Pro Beta2), how can &lt;br&gt; parallel_invoke be re-written to use variadic templates? Keep in mind &lt;br&gt; has to be called last, with the last element from the parameter pack. &lt;br&gt; I have provided an implementation, but I am not sure if this will &lt;br&gt; achieve the intended goal.
  </description>
  <guid isPermaLink="true">http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/66c253a0a5872d4f/1c9c2b22ba5fb6ea?show_docid=1c9c2b22ba5fb6ea</guid>
  <author>
  kenshin.himura.sakab...@gmail.com
  (Kenshin)
  </author>
  <pubDate>Mon, 23 Nov 2009 11:33:20 UT
</pubDate>
  </item>
  <item>
  <title>Memberwise copying?</title>
  <link>http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/700e95d5317f7933/3ce33d9e61c045c7?show_docid=3ce33d9e61c045c7</link>
  <description>
  I had always thought that C++, if you did not make an explicit copy &lt;br&gt; constructor and assignment operator, copying would be bitwise, as if a &lt;br&gt; memcpy had been performed. But as I have been trying to learn boost, &lt;br&gt; particularly boost spirit, I see constructs that seem to me as if this &lt;br&gt; is not the case. Furthermore, although there are plenty of posts that
  </description>
  <guid isPermaLink="true">http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/700e95d5317f7933/3ce33d9e61c045c7?show_docid=3ce33d9e61c045c7</guid>
  <author>
  tbandrow...@treatyist.com
  (stork)
  </author>
  <pubDate>Mon, 23 Nov 2009 11:30:51 UT
</pubDate>
  </item>
  <item>
  <title>Re: istringstream constructor performance</title>
  <link>http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/f342a1d36b54deab/91d408f9526c81fe?show_docid=91d408f9526c81fe</link>
  <description>
  Note: This code is broken. The problem is that it fails to check whether the &lt;br&gt; conversion succeeded, which is must do to get meaningful results. &lt;br&gt; C++ IOStreams are a complex system of formatting and parsing plugins for &lt;br&gt; various types which supports customizations for different cultural &lt;br&gt; conventions (locales). The printf/scanf functions also know locales, but are
  </description>
  <guid isPermaLink="true">http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/f342a1d36b54deab/91d408f9526c81fe?show_docid=91d408f9526c81fe</guid>
  <author>
  dooms...@knuut.de
  (Ulrich Eckhardt)
  </author>
  <pubDate>Mon, 23 Nov 2009 11:32:55 UT
</pubDate>
  </item>
  <item>
  <title>Re: Using Boost.Spirit in production code</title>
  <link>http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/000e67cac2fe76a8/eebe43108bc39608?show_docid=eebe43108bc39608</link>
  <description>
  I have had some experience using Spirit for production code. Looking &lt;br&gt; back, I might have made a different decision mainly due to two very &lt;br&gt; painful points: &lt;br&gt; - Compile times are a real issue. It got to the point where I changed &lt;br&gt; the structure of my code specifically for the purpose of isolating the &lt;br&gt; dependencies of the cpp which contain the spirit code in order to
  </description>
  <guid isPermaLink="true">http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/000e67cac2fe76a8/eebe43108bc39608?show_docid=eebe43108bc39608</guid>
  <author>
  shoo...@gmail.com
  (shoosh)
  </author>
  <pubDate>Mon, 23 Nov 2009 11:29:56 UT
</pubDate>
  </item>
  <item>
  <title>Re: Question on goto with try/catch</title>
  <link>http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/aea0d9b7bd90eaea/54e7d8e57cd2c180?show_docid=54e7d8e57cd2c180</link>
  <description>
  &amp;quot;Alf P. Steinbach&amp;quot; &amp;lt;al...@start.no&amp;gt; wrote in &lt;br&gt; Shouldn&#39;t you catch(...) on a module boundary &lt;br&gt; (like at the main function of a thread), just to &lt;br&gt; ensure no exceptions cross into a possibly non-C++ &lt;br&gt; area (like the OS). &lt;br&gt; Or would your answer be &amp;quot;You should know what &lt;br&gt; exceptions can get to that point, and catch
  </description>
  <guid isPermaLink="true">http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/aea0d9b7bd90eaea/54e7d8e57cd2c180?show_docid=54e7d8e57cd2c180</guid>
  <author>
  e...@ericholtman.com
  (Eric J. Holtman)
  </author>
  <pubDate>Mon, 23 Nov 2009 11:29:04 UT
</pubDate>
  </item>
  <item>
  <title>Re: std::vector of const values</title>
  <link>http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/5996d4d3269d2e90/49240ef30a49ca6a?show_docid=49240ef30a49ca6a</link>
  <description>
  you should simply add one missing const : &lt;br&gt; int main() &lt;br&gt; { &lt;br&gt; int i1, i2, i3; &lt;br&gt; std::vector&amp;lt; const int* &amp;gt; ints; // note to the const before int &lt;br&gt; ints.push_back( &amp;amp;i1 ); &lt;br&gt; ints.push_back( &amp;amp;i2 ); &lt;br&gt; ints.push_back( &amp;amp;i3 ); &lt;br&gt; doStuff( ints ); &lt;br&gt; return 0;
  </description>
  <guid isPermaLink="true">http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/5996d4d3269d2e90/49240ef30a49ca6a?show_docid=49240ef30a49ca6a</guid>
  <author>
  sha...@gmail.com
  (shahav)
  </author>
  <pubDate>Sun, 22 Nov 2009 16:07:14 UT
</pubDate>
  </item>
  <item>
  <title>Re: std::vector of const values</title>
  <link>http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/5996d4d3269d2e90/a17972c4ac3db4b3?show_docid=a17972c4ac3db4b3</link>
  <description>
  I wouldn&#39;t worry about const correctness in this particular case. It &lt;br&gt; could &lt;br&gt; be an issue if you would write an interface for other programmer to &lt;br&gt; implement &lt;br&gt; and you wouldn&#39;t want him to mess data you pass to him. In this case I &lt;br&gt; can &lt;br&gt; think of two solutions: &lt;br&gt; 1. Easy way - provide doStuff virtual method for one parameter:
  </description>
  <guid isPermaLink="true">http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/5996d4d3269d2e90/a17972c4ac3db4b3?show_docid=a17972c4ac3db4b3</guid>
  <author>
  marcin.sfi...@gmail.com
  (marcin.sfider@gmail.com)
  </author>
  <pubDate>Sun, 22 Nov 2009 13:11:29 UT
</pubDate>
  </item>
  <item>
  <title>Re: istringstream constructor performance</title>
  <link>http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/f342a1d36b54deab/43a72de94b188ad0?show_docid=43a72de94b188ad0</link>
  <description>
  &amp;lt;snip&amp;gt; &lt;br&gt; Did You remember to test performances with optimization turned on? &lt;br&gt; It makes a big difference with the C++ standard library. At least with &lt;br&gt; gcc. &lt;br&gt; Regards, Claudio Pacati
  </description>
  <guid isPermaLink="true">http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/f342a1d36b54deab/43a72de94b188ad0?show_docid=43a72de94b188ad0</guid>
  <author>
  pac...@unisi.it
  (Claudio Pacati)
  </author>
  <pubDate>Sun, 22 Nov 2009 13:16:28 UT
</pubDate>
  </item>
  <item>
  <title>Re: std::vector of const values</title>
  <link>http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/5996d4d3269d2e90/3f109efb42e3b813?show_docid=3f109efb42e3b813</link>
  <description>
  Dave wrote: &lt;br&gt; vectors instantiated with different types. int const * and int* are &lt;br&gt; completely different types. If you want to be able to deal with vectors of &lt;br&gt; different types write a template function: &lt;br&gt; template &amp;lt;typename type&amp;gt; &lt;br&gt; void doStuff(const std::vector&amp;lt;type *&amp;gt; &amp;amp; instances){ &lt;br&gt; for( size_t i(0); i != instances.size(); ++i )
  </description>
  <guid isPermaLink="true">http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/5996d4d3269d2e90/3f109efb42e3b813?show_docid=3f109efb42e3b813</guid>
  <author>
  francis.glassbo...@btinternet.com
  (Francis Glassborow)
  </author>
  <pubDate>Sun, 22 Nov 2009 13:15:32 UT
</pubDate>
  </item>
  <item>
  <title>Re: std::vector of const values</title>
  <link>http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/5996d4d3269d2e90/34a6f597eaeef058?show_docid=34a6f597eaeef058</link>
  <description>
  Dave =D0=BD=D0=B0=D0=BF=D0=B8=D1=81 =D0=B0=D0=B2(=D0=BB=D0=B0): &lt;br&gt; #include &amp;lt;vector&amp;gt; &lt;br&gt; I propose to use iterators: &lt;br&gt; template &amp;lt;typename Iter&amp;gt; &lt;br&gt; void doStuff(Iter begin, Iter end) &lt;br&gt; { &lt;br&gt; for(Iter it = begin; it != end; ++it) &lt;br&gt; { &lt;br&gt; std::cout &amp;lt;&amp;lt; **it &amp;lt;&amp;lt; std::endl; &lt;br&gt; } &lt;br&gt; ... &lt;br&gt; doStuff( ints.begin(), insts.end());
  </description>
  <guid isPermaLink="true">http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/5996d4d3269d2e90/34a6f597eaeef058?show_docid=34a6f597eaeef058</guid>
  <author>
  sh...@gala.net
  (Taras Shevchuk)
  </author>
  <pubDate>Sun, 22 Nov 2009 13:14:58 UT
</pubDate>
  </item>
  <item>
  <title>Re: std::vector of const values</title>
  <link>http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/5996d4d3269d2e90/f1983b15b4c61e8d?show_docid=f1983b15b4c61e8d</link>
  <description>
  consider &lt;br&gt; void doStuff( std::vector&amp;lt; const int* &amp;gt;&amp;amp; ints ) &lt;br&gt; This would be able to add const int* to what is actually &lt;br&gt; std::vector&amp;lt;int*&amp;gt; &lt;br&gt; Of course since it is actually passed as an immutable vector that &lt;br&gt; cannot happen but I think that that is getting too sophisticated. &lt;br&gt; One way to go would be to redefine doStuff as a template method taking
  </description>
  <guid isPermaLink="true">http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/5996d4d3269d2e90/f1983b15b4c61e8d?show_docid=f1983b15b4c61e8d</guid>
  <author>
  nick.houns...@googlemail.com
  (Nick Hounsome)
  </author>
  <pubDate>Sun, 22 Nov 2009 13:16:37 UT
</pubDate>
  </item>
  <item>
  <title>Re: istringstream constructor performance</title>
  <link>http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/f342a1d36b54deab/fc1e99883cbe7317?show_docid=fc1e99883cbe7317</link>
  <description>
  The basic problem is that you are imposing the overhead for &lt;br&gt; construction/destruction on your use. Stream classes of all kinds have &lt;br&gt; relatively expensive ctors/dtors. When you switch to static instnaces you &lt;br&gt; only pay the overhead once rather than every entry to the function. &lt;br&gt; If speed is an issue, you might try inlining ToDouble. Many compilers will
  </description>
  <guid isPermaLink="true">http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/f342a1d36b54deab/fc1e99883cbe7317?show_docid=fc1e99883cbe7317</guid>
  <author>
  francis.glassbo...@btinternet.com
  (Francis Glassborow)
  </author>
  <pubDate>Sun, 22 Nov 2009 13:13:28 UT
</pubDate>
  </item>
  <item>
  <title>Re: removing from set - does it have to be so ugly?</title>
  <link>http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/fff4ce6c3fdfd2c6/e3b2bdb3f4fdb3d1?show_docid=e3b2bdb3f4fdb3d1</link>
  <description>
  I think in-place-erasing totally corrupt the iterator. &lt;br&gt; The code erases all odd elements from a set&amp;lt;int&amp;gt;.... &lt;br&gt; but replace in &amp;quot;for(...; i &amp;lt;= 25; ...)&amp;quot; 25 with 55 &lt;br&gt; now &amp;quot;7&amp;quot; stays UN-erased &lt;br&gt; using namespace std; &lt;br&gt; void print(int elem) { &lt;br&gt; cout &amp;lt;&amp;lt; elem &amp;lt;&amp;lt; endl; &lt;br&gt; int main() { &lt;br&gt; set&amp;lt;int&amp;gt; r; &lt;br&gt; for (int i = 0; i &amp;lt;= 25; i += 5) r.insert(i);
  </description>
  <guid isPermaLink="true">http://groups.google.ca/group/comp.lang.c++.moderated/browse_thread/thread/fff4ce6c3fdfd2c6/e3b2bdb3f4fdb3d1?show_docid=e3b2bdb3f4fdb3d1</guid>
  <author>
  n...@narod.ru
  (n00m)
  </author>
  <pubDate>Sun, 22 Nov 2009 04:53:08 UT
</pubDate>
  </item>
  </channel>
</rss>
