Boost C++ Libraries: Ticket #1414: Warning suppression desirable for ios_state https://svn.boost.org/trac10/ticket/1414 <p> It is most desirable for this warning to be suppressed to allow use at MSVC level 4 without several warnings - that I am confident are not helpful. </p> <p> #ifndef BOOST_IO_IOS_STATE_HPP #define BOOST_IO_IOS_STATE_HPP </p> <p> #if defined (_MSC_VER) # pragma warning (push) # pragma warning(disable : 4512) <em> assignment operator could not be generated #endif </em></p> <p> and at the end </p> <p> #if defined (_MSC_VER) # pragma warning (pop) #endif </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1414 Trac 1.4.3 Richard Webb <richard.webb@…> Tue, 01 Apr 2008 19:57:36 GMT <link>https://svn.boost.org/trac10/ticket/1414#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1414#comment:1</guid> <description> <p> Running the ios tests on VC9 with warning level 4 results in the warnings: </p> <pre class="wiki">boost/io/ios_state.hpp(131) : warning C4512: 'boost::io::basic_ios_iostate_saver&lt;Ch&gt;' : assignment operator could not be generated boost/io/ios_state.hpp(159) : warning C4512: 'boost::io::basic_ios_exception_saver&lt;Ch&gt;' : assignment operator could not be generated boost/io/ios_state.hpp(183) : warning C4512: 'boost::io::basic_ios_tie_saver&lt;Ch&gt;' : assignment operator could not be generated boost/io/ios_state.hpp(207) : warning C4512: 'boost::io::basic_ios_rdbuf_saver&lt;Ch&gt;' : assignment operator could not be generated boost/io/ios_state.hpp(231) : warning C4512: 'boost::io::basic_ios_fill_saver&lt;Ch&gt;' : assignment operator could not be generated boost/io/ios_state.hpp(256) : warning C4512: 'boost::io::basic_ios_locale_saver&lt;Ch&gt;' : assignment operator could not be generated boost/io/ios_state.hpp(395) : warning C4512: 'boost::io::basic_ios_all_saver&lt;Ch&gt;' : assignment operator could not be generated </pre><p> Some of the classes in ios_state.hpp already have private assignment operators, which avoids this warning. The attached patch adds them to the other classes, and silences the rest of the warnings. </p> </description> <category>Ticket</category> </item> <item> <author>Richard Webb <richard.webb@…></author> <pubDate>Tue, 01 Apr 2008 19:57:48 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/1414 https://svn.boost.org/trac10/ticket/1414 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">ios.diff</span> </li> </ul> Ticket Ryan Mulder <rjmyst3@…> Fri, 29 Aug 2008 16:56:31 GMT <link>https://svn.boost.org/trac10/ticket/1414#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1414#comment:2</guid> <description> <p> This is also an issue for Visual Studio 2005 </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Vladimir Prus</dc:creator> <pubDate>Sat, 30 May 2009 05:59:13 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/1414#comment:3 https://svn.boost.org/trac10/ticket/1414#comment:3 <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">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/53425" title="Add private assignment operators. Patch from Richard Webb. This fixes ...">[53425]</a>) Add private assignment operators. </p> <p> Patch from Richard Webb. This fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1414" title="#1414: Feature Requests: Warning suppression desirable for ios_state (closed: fixed)">#1414</a>, where msvc complained that default assignment operator could not be generated. This can be fixed either by pragmas, or by declaring (but not defining), private assignment operator. The latter approach seems better, since it's likely to help on other compilers. </p> Ticket Daniel James Wed, 06 Jan 2010 08:55:26 GMT <link>https://svn.boost.org/trac10/ticket/1414#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1414#comment:4</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/58747" title="Merge warning fix from trunk. Fixes #1414. ">[58747]</a>) Merge warning fix from trunk. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1414" title="#1414: Feature Requests: Warning suppression desirable for ios_state (closed: fixed)">#1414</a>. </p> </description> <category>Ticket</category> </item> </channel> </rss>