Boost C++ Libraries: Ticket #12142: Including optional/optional_fwd.hpp then type_traits.hpp https://svn.boost.org/trac10/ticket/12142 <p> 1.61.0 beta introduces a new problem: the following code has started failing to compile since 1.60.0: </p> <div class="wiki-code"><div class="code"><pre><span class="cp">#include</span> <span class="cpf">&lt;boost/optional/optional_fwd.hpp&gt;</span><span class="cp"></span> <span class="cp">#include</span> <span class="cpf">&lt;boost/type_traits.hpp&gt;</span><span class="cp"></span> </pre></div></div><p> This appears to be caused by a change to <code>optional_fwd.hpp</code> so that it now includes <code>boost/config/suffix.hpp</code>. It turns out that that already had the potential to cause problems in 1.60.0, eg the following fails to compile: </p> <div class="wiki-code"><div class="code"><pre><span class="cp">#include</span> <span class="cpf">&lt;boost/config/suffix.hpp&gt;</span><span class="cp"></span> <span class="cp">#include</span> <span class="cpf">&lt;boost/type_traits.hpp&gt;</span><span class="cp"></span> </pre></div></div><p> Does Boost.Config allow other Boost libraries to include <code>boost/config/suffix.hpp</code> directly? If so, I think Config needs to fix the above problem. If not, <code>optional_fwd.hpp</code> needs to be changed to include <code>boost/config.hpp</code> not <code>boost/config/suffix.hpp</code> (and in that case it might be good to do the following). </p> <ol><li>scan for any other includes in any other Boost libraries </li><li>fix them </li><li>move <code>suffix.hpp</code> and similar in a <code>detail</code> subdirectory. </li></ol><p> I'm seeing equivalent errors on both Clang 3.6.2-1 and GCC 5.2.1. </p> <p> Command lines: </p> <pre class="wiki">clang++ -std=c++11 -isystem /opt/boost_1_61_0_b1_clang_build/include a.cpp g++ -std=c++11 -isystem /opt/boost_1_61_0_b1_gcc_build/include a.cpp </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12142 Trac 1.4.3 John Maddock Sun, 05 Jun 2016 17:44:32 GMT owner, component changed https://svn.boost.org/trac10/ticket/12142#comment:1 https://svn.boost.org/trac10/ticket/12142#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">John Maddock</span> to <span class="trac-author">Fernando Cacciola</span> </li> <li><strong>component</strong> <span class="trac-field-old">config</span> → <span class="trac-field-new">optional</span> </li> </ul> <p> No way should optional be including an internal Config header directly - that's just not supported. </p> Ticket Tony Lewis <tonyelewis@…> Wed, 10 Aug 2016 19:55:55 GMT <link>https://svn.boost.org/trac10/ticket/12142#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12142#comment:2</guid> <description> <p> I think this is related to <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/12179" title="#12179: Bugs: Including boost/optional/optional_fwd.hpp without first including ... (closed: fixed)">ticket:12179</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>akrzemi1</dc:creator> <pubDate>Mon, 19 Sep 2016 07:40:48 GMT</pubDate> <title>owner, milestone changed https://svn.boost.org/trac10/ticket/12142#comment:3 https://svn.boost.org/trac10/ticket/12142#comment:3 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Fernando Cacciola</span> to <span class="trac-author">akrzemi1</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.62.0</span> </li> </ul> Ticket akrzemi1 Mon, 19 Sep 2016 07:41:19 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/12142#comment:4 https://svn.boost.org/trac10/ticket/12142#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">fixed</span> </li> </ul> Ticket Tony Lewis <tonyelewis@…> Tue, 20 Sep 2016 09:29:47 GMT <link>https://svn.boost.org/trac10/ticket/12142#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12142#comment:5</guid> <description> <p> Yes - the develop branch of the <a class="ext-link" href="https://github.com/boostorg/optional"><span class="icon">​</span>boostorg/optional !GitHub repo</a> now works for me. </p> <p> Thanks very much for your work on this. </p> </description> <category>Ticket</category> </item> </channel> </rss>