Boost C++ Libraries: Ticket #3589: Compiler could not create assigment operator https://svn.boost.org/trac10/ticket/3589 <p> Flood of warnings for that issue. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3589 Trac 1.4.3 Seweryn Habdank-Wojewodzki <seweryn@…> Thu, 05 Nov 2009 07:24:04 GMT attachment set https://svn.boost.org/trac10/ticket/3589 https://svn.boost.org/trac10/ticket/3589 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">serialization_array.hpp.patch</span> </li> </ul> <p> Patch for the problem </p> Ticket Robert Ramey Fri, 06 Nov 2009 16:24:11 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3589#comment:1 https://svn.boost.org/trac10/ticket/3589#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">worksforme</span> </li> </ul> <p> What warnings? </p> <p> I'm not seeing anything on my two compilers. </p> <p> wouldn't your change lead to linking issues instead of some warning. </p> <p> Need more information to address this. </p> <p> Robert Ramey </p> Ticket Seweryn Habdank-Wojewodzki <seweryn@…> Fri, 06 Nov 2009 20:30:26 GMT status changed; resolution deleted https://svn.boost.org/trac10/ticket/3589#comment:2 https://svn.boost.org/trac10/ticket/3589#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">worksforme</span> </li> </ul> <p> Hi, </p> <p> For sure it will not be a linker problem, because operator= is in private section and nobody should access private section. See how ::boost::noncopyable is implemented. </p> <p> If there is no assignment operator compiler is trying to create one. When fails, generate warning and default assignment operator which makes copy bit by bit, what usually is error prone. </p> <p> Regards, Seweryn Habdank-Wojewodzki. </p> Ticket anonymous Fri, 06 Nov 2009 20:39:56 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3589#comment:3 https://svn.boost.org/trac10/ticket/3589#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">worksforme</span> </li> </ul> <p> "If there is no assignment operator compiler is trying to create one. When fails, generate warning and default assignment operator which makes copy bit by bit, what usually is error prone." </p> <p> Hmmm - are you quite sure? I was sure that the default assigment was element by element rather than bit by bit. </p> <p> Having said that, I still get no warning in any of 200 tests. I test with MSVC 7.1 and gcc 4.3.2. That is, it still works for me. </p> <p> Let me know what compiler you're using and include a small example which emits this warning. </p> <p> Robert Ramey </p> Ticket rwebb <richard.webb@…> Fri, 06 Nov 2009 21:59:45 GMT <link>https://svn.boost.org/trac10/ticket/3589#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3589#comment:4</guid> <description> <p> I guess that the compiler is some version of MSVC, and it's being run with /W4. You get the warning from the test_array.cpp regression test if you build it in VC9 with /W4 - i've attached a snippet of the warning message. </p> <p> I'd guess that the warning is because the "std::size_t const m_element_count;" member is preventing the compiler from auto-generating an assignment operator. Doesn't really matter unless you actually want to assign the array, but the warning it produces is quite large. </p> </description> <category>Ticket</category> </item> <item> <author>rwebb <richard.webb@…></author> <pubDate>Fri, 06 Nov 2009 22:00:57 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/3589 https://svn.boost.org/trac10/ticket/3589 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">warning.txt</span> </li> </ul> Ticket Seweryn Habdank-Wojewodzki <seweryn@…> Tue, 10 Nov 2009 15:59:49 GMT status changed; resolution deleted https://svn.boost.org/trac10/ticket/3589#comment:5 https://svn.boost.org/trac10/ticket/3589#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">worksforme</span> </li> </ul> <p> Hi Robert, </p> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/3589#comment:3" title="Comment 3">anonymous</a>: </p> <blockquote class="citation"> <p> Hmmm - are you quite sure? I was sure that the default assigment was element by element rather than bit by bit. </p> </blockquote> <p> OK - Element by element, but it might be error prone. </p> <p> See boost/io/ios_state.hpp how the code looks like. </p> <blockquote class="citation"> <p> Having said that, I still get no warning in any of 200 tests. I test with MSVC 7.1 and gcc 4.3.2. That is, it still works for me. </p> </blockquote> <p> I have MSVC 9.0. </p> <blockquote class="citation"> <p> Let me know what compiler you're using and include a small example which emits this warning. </p> </blockquote> <p> My example is very big one - you do not want to study it. I will try to extract something. </p> <p> Best regards, Seweryn. </p> Ticket Robert Ramey Fri, 27 Nov 2009 22:28:17 GMT <link>https://svn.boost.org/trac10/ticket/3589#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3589#comment:6</guid> <description> <p> This warning is included in the list of all warnings I can fix. The confusion is that I normally compile at level 3 and this warning only appears at level 4. In any case I've fixed them all in the trunk. and they will migrate to the release branch soon. </p> <p> Robert Ramey </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Fri, 27 Nov 2009 22:54:41 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/3589#comment:7 https://svn.boost.org/trac10/ticket/3589#comment:7 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket Seweryn Habdank-Wojewodzki <seweryn@…> Sun, 06 Dec 2009 19:56:21 GMT <link>https://svn.boost.org/trac10/ticket/3589#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3589#comment:8</guid> <description> <p> Hi, </p> <blockquote class="citation"> <p> In any case I've fixed them all in the trunk. and they will migrate to the release branch soon. </p> </blockquote> <p> Thank you very much! </p> <p> Best regards, Seweryn. </p> </description> <category>Ticket</category> </item> </channel> </rss>