<?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.co.uk/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-09T02:28:14Z</updated>
  <generator uri="http://groups.google.co.uk" version="1.99">Google Groups</generator>
  <entry>
  <author>
  <name>mattia</name>
  <email>ger...@gmail.com</email>
  </author>
  <updated>2009-11-09T02:28:14Z</updated>
  <id>http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/19b1bd9c2e086cdc/bdc87c2b8be66789?show_docid=bdc87c2b8be66789</id>
  <link href="http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/19b1bd9c2e086cdc/bdc87c2b8be66789?show_docid=bdc87c2b8be66789"/>
  <title type="text">Re: help on round robin tournament</title>
  <summary type="html" xml:space="preserve">
  Il Sun, 08 Nov 2009 16:29:38 -0600, red floyd ha scritto: &lt;br&gt; Well, I know no comp.algorithms newsgroup...
  </summary>
  </entry>
  <entry>
  <author>
  <name>Maxim Yegorushkin</name>
  <email>maxim.yegorush...@gmail.com</email>
  </author>
  <updated>2009-11-09T02:27:12Z</updated>
  <id>http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/c5a5ba42a62a7ced/c18303d4333a886f?show_docid=c18303d4333a886f</id>
  <link href="http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/c5a5ba42a62a7ced/c18303d4333a886f?show_docid=c18303d4333a886f"/>
  <title type="text">Re: #include file optimizer</title>
  <summary type="html" xml:space="preserve">
  In my personal opinion this is rather unsatisfactory. &lt;br&gt; With self-contained headers (headers that include other headers as &lt;br&gt; needed) a new header dependency only triggers client recompilation, but &lt;br&gt; no editing of clients required (provided interfaces don&#39;t change). &lt;br&gt; A good practice they use in boost to ensure that headers are
  </summary>
  </entry>
  <entry>
  <author>
  <name>red floyd</name>
  <email>no.spam.h...@its.invalid</email>
  </author>
  <updated>2009-11-08T22:29:38Z</updated>
  <id>http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/19b1bd9c2e086cdc/3b0592a0a888de7c?show_docid=3b0592a0a888de7c</id>
  <link href="http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/19b1bd9c2e086cdc/3b0592a0a888de7c?show_docid=3b0592a0a888de7c"/>
  <title type="text">Re: help on round robin tournament</title>
  <summary type="html" xml:space="preserve">
  Sorry. Then you&#39;re better off asking in comp.algorithms. There&#39;s &lt;br&gt; nothing C++ specific in your question, other than your use of a deque.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Ulrich Eckhardt</name>
  <email>dooms...@knuut.de</email>
  </author>
  <updated>2009-11-08T22:29:18Z</updated>
  <id>http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/fcd915bfbc281052/bf4ea23c11569c2f?show_docid=bf4ea23c11569c2f</id>
  <link href="http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/fcd915bfbc281052/bf4ea23c11569c2f?show_docid=bf4ea23c11569c2f"/>
  <title type="text">Re: operator+() code for objects</title>
  <summary type="html" xml:space="preserve">
  Huh? &lt;br&gt; Get a good book. Many things changed. &lt;br&gt; Several things here: &lt;br&gt; 1. Make one-argument constructor &#39;explicit&#39; to avoid accidental &lt;br&gt; construction. &lt;br&gt; 2. Do not create a virtual destructor for objects you don&#39;t plan to use &lt;br&gt; polymorphically. &lt;br&gt; 3. You #include &amp;lt;iostream&amp;gt; but use printf() for which you didn&#39;t include any
  </summary>
  </entry>
  <entry>
  <author>
  <name>Matthew Collett</name>
  <email>m.coll...@auckland.ac.nz</email>
  </author>
  <updated>2009-11-08T20:22:16Z</updated>
  <id>http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/fcd915bfbc281052/f6b4765a69fbe0e1?show_docid=f6b4765a69fbe0e1</id>
  <link href="http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/fcd915bfbc281052/f6b4765a69fbe0e1?show_docid=f6b4765a69fbe0e1"/>
  <title type="text">Re: operator+() code for objects</title>
  <summary type="html" xml:space="preserve">
  In article &lt;br&gt; &amp;lt;bea3b28d-235b-4b0d-8421-9fef3 ecb8...@a31g2000yqn.googlegrou ps.com&amp;gt;, &lt;br&gt; ... &lt;br&gt; And here is your problem. Your copy constructor should take its &lt;br&gt; argument by constant reference: &lt;br&gt; vec(const vec &amp;amp;rv) : mx(rv.mx) { printf(&amp;quot;in copy constr\n&amp;quot;); }; &lt;br&gt; Currently you cannot copy const objects, and so the compiler complains
  </summary>
  </entry>
  <entry>
  <author>
  <name>Rune Allnor</name>
  <email>all...@tele.ntnu.no</email>
  </author>
  <updated>2009-11-08T20:22:11Z</updated>
  <id>http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/35ea5d26b77007f7/6f8bed6eaf1b653b?show_docid=6f8bed6eaf1b653b</id>
  <link href="http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/35ea5d26b77007f7/6f8bed6eaf1b653b?show_docid=6f8bed6eaf1b653b"/>
  <title type="text">Run-time overhead of text-based storage formats for numerical data</title>
  <summary type="html" xml:space="preserve">
  Hi all. &lt;br&gt; A couple of weeks ago I posted a question on comp.lang.c++ about some &lt;br&gt; technicality &lt;br&gt; about binary file IO. Over the course of the discussion, I discovered &lt;br&gt; to my &lt;br&gt; amazement - and, quite frankly, horror - that there seems to be a &lt;br&gt; school of &lt;br&gt; thought that text-based storage formats are universally preferable to
  </summary>
  </entry>
  <entry>
  <author>
  <name>AnonMail2005@gmail.com</name>
  <email>anonmail2...@gmail.com</email>
  </author>
  <updated>2009-11-08T20:22:09Z</updated>
  <id>http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/025225fdd466c018/66cb4fe3408c5357?show_docid=66cb4fe3408c5357</id>
  <link href="http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/025225fdd466c018/66cb4fe3408c5357?show_docid=66cb4fe3408c5357"/>
  <title type="text">Re: Check .lib is complete</title>
  <summary type="html" xml:space="preserve">
  On Nov 2, 11:53 am, Louis Lavery &amp;lt;Lo...@LaverREMOVE.demon.co.uk &amp;gt; &lt;br&gt; wrote: &lt;br&gt; google dependency walker. It&#39;s a free download. That will go a long &lt;br&gt; way toward telling you. But even that will sometimes give an external &lt;br&gt; dependency that is not needed. &lt;br&gt; HTH
  </summary>
  </entry>
  <entry>
  <author>
  <name>Neil Butterworth</name>
  <email>nbutterworth1...@gmail.com</email>
  </author>
  <updated>2009-11-08T20:16:45Z</updated>
  <id>http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/fcd915bfbc281052/127ce2d6e033b36d?show_docid=127ce2d6e033b36d</id>
  <link href="http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/fcd915bfbc281052/127ce2d6e033b36d?show_docid=127ce2d6e033b36d"/>
  <title type="text">Re: operator+() code for objects</title>
  <summary type="html" xml:space="preserve">
  My comments are inline with te code: &lt;br&gt; Your use of printf() (why not use iostreams?) eans that you should &lt;br&gt; include the header it s declared in: &lt;br&gt; This is your main problem. A copy constructor should take a const &lt;br&gt; reference as it&#39;s parameter - you want: &lt;br&gt; vec( const vec &amp;amp;rv) : mx(rv.mx) { printf(&amp;quot;in copy constr\n&amp;quot;); };
  </summary>
  </entry>
  <entry>
  <author>
  <name>Pete Becker</name>
  <email>p...@versatilecoding.com</email>
  </author>
  <updated>2009-11-08T20:18:54Z</updated>
  <id>http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/5573a50b65399946/f41dcba0780bec1d?show_docid=f41dcba0780bec1d</id>
  <link href="http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/5573a50b65399946/f41dcba0780bec1d?show_docid=f41dcba0780bec1d"/>
  <title type="text">Re: static_cast&lt;unsigned equivalent&gt;(signed type);</title>
  <summary type="html" xml:space="preserve">
  That&#39;s what it was. Now it&#39;s a hexadecimal constant prefix.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Torsten Robitzki</name>
  <email>myfirstn...@robitzki.de</email>
  </author>
  <updated>2009-11-08T20:17:27Z</updated>
  <id>http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/fcd915bfbc281052/356a7d36234d48cf?show_docid=356a7d36234d48cf</id>
  <link href="http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/fcd915bfbc281052/356a7d36234d48cf?show_docid=356a7d36234d48cf"/>
  <title type="text">Re: operator+() code for objects</title>
  <summary type="html" xml:space="preserve">
  silentway schrieb: &lt;br&gt; &amp;lt;snip&amp;gt; &lt;br&gt; I hope so. The problem is you copy contructor taking a refernce to not &lt;br&gt; const vec. The term A + B creates a temporary and a temporary can&#39;t be &lt;br&gt; bound to a reference to not const vec. &lt;br&gt; vec(const vec &amp;amp;rv) : mx(rv.mx) { printf(&amp;quot;in copy constr\n&amp;quot;); }; &lt;br&gt; ^^^^^ &lt;br&gt; will solve the problem.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Jonathan Thornburg</name>
  <email>clcppm-pos...@this.is.invalid</email>
  </author>
  <updated>2009-11-08T20:18:53Z</updated>
  <id>http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/c5a5ba42a62a7ced/0ed64b2f0796d2ef?show_docid=0ed64b2f0796d2ef</id>
  <link href="http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/c5a5ba42a62a7ced/0ed64b2f0796d2ef?show_docid=0ed64b2f0796d2ef"/>
  <title type="text">Re: #include file optimizer</title>
  <summary type="html" xml:space="preserve">
  In the headers-don&#39;t-include-other-he aders style, the &amp;quot;prerequisites&amp;quot; &lt;br&gt; comment will now read &lt;br&gt; // &lt;br&gt; // prerequisites: &lt;br&gt; // &amp;lt;string&amp;gt; &lt;br&gt; // &amp;lt;list&amp;gt; &lt;br&gt; // &lt;br&gt; and all clients are required to update their source code accordingly. &lt;br&gt; Hmm. I agree that it&#39;s not an ideal situation, but it seems to me &lt;br&gt; that it&#39;s basically the same as that for any other change in class x
  </summary>
  </entry>
  <entry>
  <author>
  <name>Paul Bibbings</name>
  <email>paul_bibbi...@googlemail.com</email>
  </author>
  <updated>2009-11-08T20:17:28Z</updated>
  <id>http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/fcd915bfbc281052/2c8a9969275903c3?show_docid=2c8a9969275903c3</id>
  <link href="http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/fcd915bfbc281052/2c8a9969275903c3?show_docid=2c8a9969275903c3"/>
  <title type="text">Re: operator+() code for objects</title>
  <summary type="html" xml:space="preserve">
  The problem here is not actually that you cannot return a local variable, but &lt;br&gt; rather that you do not have a copy constructor that can perform the required &lt;br&gt; copy initialization of F from the value returned by your overload operator+() &lt;br&gt; (see below). &lt;br&gt; I was not seriously coding in C++ 10 years ago and have never used the Zortech
  </summary>
  </entry>
  <entry>
  <author>
  <name>marcin.sfider@gmail.com</name>
  <email>marcin.sfi...@gmail.com</email>
  </author>
  <updated>2009-11-08T20:16:40Z</updated>
  <id>http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/fcd915bfbc281052/36be6a86ee644593?show_docid=36be6a86ee644593</id>
  <link href="http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/fcd915bfbc281052/36be6a86ee644593?show_docid=36be6a86ee644593"/>
  <title type="text">Re: operator+() code for objects</title>
  <summary type="html" xml:space="preserve">
  Copy constructor should have parameter passed by const reference &lt;br&gt; like this: &lt;br&gt; vec(const vec&amp;amp; rv) : mx(rv.mx) { /* wathever */ } &lt;br&gt; There is no need (I can think of) for returning const value and yes, &lt;br&gt; this method should rather be const (you do not whant to change value &lt;br&gt; in this vector while calculating its sum with A)
  </summary>
  </entry>
  <entry>
  <author>
  <name>SG</name>
  <email>s.gesem...@gmail.com</email>
  </author>
  <updated>2009-11-08T20:16:40Z</updated>
  <id>http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/fcd915bfbc281052/8d901f3279f630e0?show_docid=8d901f3279f630e0</id>
  <link href="http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/fcd915bfbc281052/8d901f3279f630e0?show_docid=8d901f3279f630e0"/>
  <title type="text">Re: operator+() code for objects</title>
  <summary type="html" xml:space="preserve">
  [snip] &lt;br&gt; Your copy constructor takes a reference-to-NON-CONST. This probably &lt;br&gt; explains the errors you&#39;re getting. &lt;br&gt; You should get rid of your copy ctor, assignment operator *and* &lt;br&gt; destructor (unless you want it to be virtual for some reason). The &lt;br&gt; compiler-generated ones are correct and should be preferred.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Thomas J. Gritzan</name>
  <email>phygon_antis...@gmx.de</email>
  </author>
  <updated>2009-11-08T20:17:33Z</updated>
  <id>http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/fcd915bfbc281052/b9f29ab3fdc868da?show_docid=b9f29ab3fdc868da</id>
  <link href="http://groups.google.co.uk/group/comp.lang.c++.moderated/browse_thread/thread/fcd915bfbc281052/b9f29ab3fdc868da?show_docid=b9f29ab3fdc868da"/>
  <title type="text">Re: operator+() code for objects</title>
  <summary type="html" xml:space="preserve">
  silentway schrieb: &lt;br&gt; Let&#39;s see... &lt;br&gt; Your copy constructor takes a non-const reference. &lt;br&gt; Your operator+ returns a temporary. If you do &lt;br&gt; vec v = a + b; &lt;br&gt; the temporary returned by op+ cannot be used to copy-construct v, &lt;br&gt; because temporaries can only be bound to const references. &lt;br&gt; So change your copy ctor to &lt;br&gt; vec(const vec &amp;amp;rv)
  </summary>
  </entry>
</feed>
