Boost C++ Libraries: Ticket #7675: BOOST_NO_DECLTYPE doesn't imply BOOST_NO_DECLTYPE_N3276 anymore https://svn.boost.org/trac10/ticket/7675 <p> Here's a simple repro: </p> <pre class="wiki">#define BOOST_NO_DECLTYPE #include &lt;boost/suffix.hpp&gt; #ifndef BOOST_NO_DECLTYPE_N3276 #error "BOOST_NO_DECLTYPE should imply BOOST_NO_DECLTYPE_N3276" #endif </pre><p> (I include only suffix.hpp so that the bug reproduces on any compiler; you can include boost/config.hpp instead, if you use a compiler that Boost detects as supporting N3276) </p> <p> This fails with Boost 1.52.0, but builds with 1.50.0 (I don't have 1.51.0 handy to test, but from context I suspect it fails there too). This is a problem because utility/result_of.hpp, and possibly other Boost code, assumes decltype is permitted if BOOST_NO_DECLTYPE_N3276 is not defined; due to this bug, that code will continue to use decltype even when the user specifies BOOST_NO_DECLTYPE. </p> <p> I've attached a patch that fixes this specific issue, but note that it may reflect a more general problem with the handling of deprecated config macros. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7675 Trac 1.4.3 gromer@… Fri, 09 Nov 2012 17:38:34 GMT attachment set https://svn.boost.org/trac10/ticket/7675 https://svn.boost.org/trac10/ticket/7675 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">decltype.patch</span> </li> </ul> <p> Patch to fix the issue, relative to 1.52.0 </p> Ticket Geoff Romer <gromer@…> Fri, 09 Nov 2012 23:24:27 GMT <link>https://svn.boost.org/trac10/ticket/7675#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7675#comment:1</guid> <description> <p> Hmm; the problem is indeed more general: user-supplied settings of <em>any</em> of the deprecated macros will be ignored by Boost code that uses the corresponding new macros. This is because, although suffix.hpp contains code to set the legacy macros based on the new macros, the config headers have no corresponding code to set the new macros based on the legacy macros. I've specifically encountered this in the context of boost/thread/locks.hpp's use of <code>BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS</code>, but this is presumably just one instance of many. </p> <p> Note that this deprecation is not even documented yet (see <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7676" title="#7676: Bugs: Config macro deprecations are not documented (closed: fixed)">ticket:7676</a>), so the fact that these macros are marked deprecated deep in the config headers is no excuse for breaking support for them. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Thu, 15 Nov 2012 13:39:02 GMT</pubDate> <title>owner changed https://svn.boost.org/trac10/ticket/7675#comment:2 https://svn.boost.org/trac10/ticket/7675#comment:2 <ul> <li><strong>owner</strong> changed from <span class="trac-author">John Maddock</span> to <span class="trac-author">Marshall Clow</span> </li> </ul> <p> Marshall, as you made the changes to deprecate/rename those macros, can you take a look? </p> <p> Thanks! John. </p> Ticket Marshall Clow Tue, 11 Dec 2012 17:29:50 GMT <link>https://svn.boost.org/trac10/ticket/7675#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7675#comment:3</guid> <description> <p> The good news is that almost no Boost code uses these macros (<code>BOOST_NO_DECLTYPE_N3276</code> and <code>BOOST_NO_DECLTYPE</code>) any more. Right now, it's just Fusion, Spirit, and Chrono; and I'm working to make sure that these will be all be removed in the 1.53 release. </p> <p> That being said, the breaking support for the old macros was a mistake, and I apologize. </p> <p> However, I think that going forward, the best way to deal with this is to well, just go forward and use the new macros. </p> <p> I'm still looking at this, though - leaving this bug report open. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Marshall Clow</dc:creator> <pubDate>Thu, 01 May 2014 19:08:26 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7675#comment:4 https://svn.boost.org/trac10/ticket/7675#comment:4 <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">wontfix</span> </li> </ul> <p> There was only one use of BOOST_NO_DECLTYPE in the 1.55 release, and none of BOOST_NO_DECLTYPE_N3276. </p> <p> Closing this as "wont fix" </p> Ticket