Boost C++ Libraries: Ticket #7477: boost:::format will not compile under VC++ WITH "Microsoft language extensions" https://svn.boost.org/trac10/ticket/7477 <p> Boost::format will not compile under Microsoft VC++ unless Microsoft Language Extensions (/Za) are turned OFF. When MS Language Extensions are turned ON, the compiler complains because boost overrides some virtual functions in std:: classes with functions lacking a "throw()" specifier. One of the functions is the destructor ~basic_streambuf(). </p> <p> I do not know if this is a bug or a misunderstanding on my part. If it is a bug, I do not know whether it is on the MS or boost side. However, it should be a simple matter to decorate those functions with "throw()." That could save someone a lot of trouble. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7477 Trac 1.4.3 Jive Dadson <jdadson@…> Sun, 07 Oct 2012 06:13:32 GMT <link>https://svn.boost.org/trac10/ticket/7477#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7477#comment:1</guid> <description> <p> I asked about this on Stackoverflow. <a class="ext-link" href="http://stackoverflow.com/questions/12764151/compiler-error-vc-2012-boostformat/12764654#12764654"><span class="icon">​</span>http://stackoverflow.com/questions/12764151/compiler-error-vc-2012-boostformat/12764654#12764654</a> </p> </description> <category>Ticket</category> </item> <item> <author>Jive Dadson <jdadson@…></author> <pubDate>Sun, 07 Oct 2012 06:16:26 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7477#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7477#comment:2</guid> <description> <p> Eratum: I should have said, "Boost::format will not compile under Microsoft VC++ unless Microsoft Language Extensions (/Za) are turned ON." I cannot find an "edit" button on the ticket. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Michel Morin</dc:creator> <pubDate>Sun, 07 Oct 2012 06:37:54 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7477#comment:3 https://svn.boost.org/trac10/ticket/7477#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">invalid</span> </li> </ul> <p> <strong>Don't use /Za.</strong> </p> <p> The /Za option is buggy and you shouldn't use it. See the posts from Stephan T. Lavavej (Visual C++ libraries developer) such as <a class="ext-link" href="http://thread.gmane.org/gmane.comp.compilers.clang.devel/21638/focus=21638"><span class="icon">​</span>this</a> and <a class="ext-link" href="http://thread.gmane.org/gmane.comp.lib.boost.devel/212140/focus=212186"><span class="icon">​</span>this</a>. Also, <a class="ext-link" href="https://svn.boost.org/trac/boost/wiki/Guidelines/WarningsGuidelines"><span class="icon">​</span>Boost's warning guidelines</a> might be useful for you. </p> Ticket Michel Morin Sun, 07 Oct 2012 06:39:41 GMT <link>https://svn.boost.org/trac10/ticket/7477#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7477#comment:4</guid> <description> <p> Ah, I meant "don't turn off Microsoft Language Extensions." </p> </description> <category>Ticket</category> </item> <item> <author>Jive Dadson <jdadson@…></author> <pubDate>Sun, 07 Oct 2012 06:58:49 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7477#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7477#comment:5</guid> <description> <p> I would like for the decision to close this item to be reviewed. I spent hours figuring out what was wrong. Others will too. Or give up. What could it hurt to add "throw()" to some functions that cannot throw an exception? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Michel Morin</dc:creator> <pubDate>Sun, 07 Oct 2012 07:15:37 GMT</pubDate> <title>status changed; resolution deleted https://svn.boost.org/trac10/ticket/7477#comment:6 https://svn.boost.org/trac10/ticket/7477#comment:6 <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">invalid</span> </li> </ul> Ticket Jive Dadson <jdadson@…> Sun, 07 Oct 2012 12:17:04 GMT <link>https://svn.boost.org/trac10/ticket/7477#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7477#comment:7</guid> <description> <p> @James I tracked it down. The bug is in the VC++ header file The declaration for ~basic_streambuf() does not have a "throw()" exception-specifier. Section 27.6.3, C++11; Section 27.5.1 C++03. Nevertheless, boost could add it harmlessly. The destructor is on line 65 in alt_sstream_impl.hpp. </p> <blockquote> <p> virtual ~basic_altstringbuf() throw() <em> edit, j. dadson </em></p> <blockquote> <p> { dealloc(); } </p> </blockquote> </blockquote> </description> <category>Ticket</category> </item> <item> <dc:creator>Jive Dadson</dc:creator> <pubDate>Sun, 07 Oct 2012 21:37:25 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7477#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7477#comment:8</guid> <description> <p> I submitted a bug report to Microsoft. <a class="ext-link" href="https://connect.microsoft.com/VisualStudio/feedback/details/766514/incorrect-exception-specifier-in-vc-header-file-causes-correct-user-code-not-to-compile#tabs"><span class="icon">​</span>https://connect.microsoft.com/VisualStudio/feedback/details/766514/incorrect-exception-specifier-in-vc-header-file-causes-correct-user-code-not-to-compile#tabs</a> - Jive </p> </description> <category>Ticket</category> </item> <item> <dc:creator>claudiordgz</dc:creator> <pubDate>Sun, 30 Nov 2014 00:47:13 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7477#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7477#comment:9</guid> <description> <p> I spent hours as well, the error appeared in ASIO (No Boost) in my case in error.ipp </p> <p> const char* name() const ASIO_ERROR_CATEGORY_NOEXCEPT </p> <p> and in error_code.ipp </p> <p> const char* name() const ASIO_ERROR_CATEGORY_NOEXCEPT </p> <p> For the moment I had to add the throw, but I feel filthy. </p> <p> I think this error should be fixed from MS end, just my two cents. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Marshall Clow</dc:creator> <pubDate>Fri, 13 Oct 2017 13:44:18 GMT</pubDate> <title>summary changed https://svn.boost.org/trac10/ticket/7477#comment:10 https://svn.boost.org/trac10/ticket/7477#comment:10 <ul> <li><strong>summary</strong> <span class="trac-field-old">boost:::format will not compile under VC++ without "Microsoft language extensions"</span> → <span class="trac-field-new">boost:::format will not compile under VC++ WITH "Microsoft language extensions"</span> </li> </ul> Ticket James E. King, III Sat, 14 Oct 2017 12:09:27 GMT owner, status, milestone changed https://svn.boost.org/trac10/ticket/7477#comment:11 https://svn.boost.org/trac10/ticket/7477#comment:11 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Samuel Krempp</span> to <span class="trac-author">James E. King, III</span> </li> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">new</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.66.0</span> </li> </ul> <p> <a class="ext-link" href="https://github.com/boostorg/format/pull/21"><span class="icon">​</span>https://github.com/boostorg/format/pull/21</a> merged into develop leaving open until merged into master </p> Ticket James E. King, III Wed, 18 Oct 2017 19:16:30 GMT status changed https://svn.boost.org/trac10/ticket/7477#comment:12 https://svn.boost.org/trac10/ticket/7477#comment:12 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket James E. King, III Fri, 20 Oct 2017 16:22:30 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7477#comment:13 https://svn.boost.org/trac10/ticket/7477#comment:13 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket