Boost C++ Libraries: Ticket #12874: future<> extension constructor must be under BOOST_THREAD_PROVIDES_FUTURE_UNWRAP https://svn.boost.org/trac10/ticket/12874 <p> In Boost 1.63.0's "boost/thread/future.hpp", we see this code: </p> <pre class="wiki"> inline explicit BOOST_THREAD_FUTURE(BOOST_THREAD_RV_REF(BOOST_THREAD_FUTURE&lt;BOOST_THREAD_FUTURE&lt;R&gt; &gt;) other); // EXTENSION </pre><p> Unfortunately, the actual definition of this inline constructor is located under an #ifdef that may not be defined at compile time: </p> <pre class="wiki">#if defined BOOST_THREAD_PROVIDES_FUTURE_UNWRAP // many lines snipped... template &lt;typename R&gt; inline BOOST_THREAD_FUTURE&lt;R&gt;::BOOST_THREAD_FUTURE(BOOST_THREAD_RV_REF(BOOST_THREAD_FUTURE&lt;BOOST_THREAD_FUTURE&lt;R&gt; &gt;) other) : base_type(other.unwrap()) {} // several lines snipped... #endif </pre><p> The result is that this inline constructor is declared but not defined, which produces very confusing linker errors. </p> <p> The appropriate solution is to wrap the declaration of this constructor in </p> <pre class="wiki">#if defined BOOST_THREAD_PROVIDES_FUTURE_UNWRAP #endif </pre><p> No other change needs to be made, as far as I know. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12874 Trac 1.4.3 viboes Sat, 29 Apr 2017 01:47:02 GMT owner, status changed https://svn.boost.org/trac10/ticket/12874#comment:1 https://svn.boost.org/trac10/ticket/12874#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">viboes</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket viboes Sat, 29 Apr 2017 15:58:51 GMT milestone changed https://svn.boost.org/trac10/ticket/12874#comment:2 https://svn.boost.org/trac10/ticket/12874#comment:2 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.65.0</span> </li> </ul> <p> <a class="ext-link" href="https://github.com/boostorg/thread/commit/c83d30f5260544949a6fb1580d380001f20811b8"><span class="icon">​</span>https://github.com/boostorg/thread/commit/c83d30f5260544949a6fb1580d380001f20811b8</a> </p> Ticket viboes Sat, 24 Jun 2017 14:56:10 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/12874#comment:3 https://svn.boost.org/trac10/ticket/12874#comment:3 <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