Boost C++ Libraries: Ticket #10159: GCC 4.4 error sorry, unimplemented https://svn.boost.org/trac10/ticket/10159 <p> A bunch of tests fail to compile on GCC 4.4 with -std=gnu++0x. Specifically it's my test runners NA-QNX650-SP1* on QNX 6.5.0 which are the only ones running that compiler configuration at the moment. </p> <p> For example async__async_executor_p fails to compile with this message: </p> <pre class="wiki">In file included from ../libs/thread/test/sync/futures/async/async_executor_pass.cpp:28: ../boost/thread/future.hpp: In function 'boost::future&lt;Rp&gt; boost::async(Executor&amp;, R (*)(ArgTypes&amp;&amp; ...), ArgTypes&amp;&amp; ...)': ../boost/thread/future.hpp:3850: sorry, unimplemented: cannot expand 'typename boost::decay&lt;ArgTypes&gt;::type ...' into a fixed-length argument list ../boost/thread/future.hpp:3850: error: invalid type in declaration before ';' token ../boost/thread/future.hpp:3851: error: 'BF' is not a class type ../boost/thread/future.hpp:3851: error: 'result_type' in class 'BF' does not name a type ../boost/thread/future.hpp:3851: error: invalid type in declaration before ';' token ../boost/thread/future.hpp: In function 'boost::future&lt;typename boost::result_of&lt;typename boost::decay&lt;F&gt;::type(typename boost::decay&lt;ArgTypes&gt;::type ...)&gt;::type&gt; boost::async(Executor&amp;, F&amp;&amp;, ArgTypes&amp;&amp; ...)': ../boost/thread/future.hpp:3867: sorry, unimplemented: cannot expand 'typename boost::decay&lt;ArgTypes&gt;::type ...' into a fixed-length argument list ../boost/thread/future.hpp:3867: error: invalid type in declaration before ';' token ../boost/thread/future.hpp:3868: error: 'BF' is not a class type ../boost/thread/future.hpp:3868: error: 'result_type' in class 'BF' does not name a type ../boost/thread/future.hpp:3868: error: invalid type in declaration before ';' token ../boost/thread/future.hpp: In member function 'void boost::detail::shared_state_nullary_task&lt;Rp, Fp&gt;::operator()() [with Rp = int, Fp = int]': ../boost/thread/detail/nullary_function.hpp:52: instantiated from 'void boost::detail::nullary_function&lt;void()&gt;::impl_type&lt;F&gt;::call() [with F = boost::detail::shared_state_nullary_task&lt;int, int&gt;]' ../libs/thread/test/sync/futures/async/async_executor_pass.cpp:251: instantiated from here ../boost/thread/future.hpp:3692: error: '((boost::detail::shared_state_nullary_task&lt;int, int&gt;*)this)-&gt;boost::detail::shared_state_nullary_task&lt;int, int&gt;::f_' cannot be used as a function </pre><p> For example ex_with_lock_guard fails to compile with this message: </p> <pre class="wiki">In file included from ../libs/thread/test/../example/with_lock_guard.cpp:13: ../boost/thread/with_lock_guard.hpp: In instantiation of 'decltype (func((#'template_id_expr' not supported by pp_c_expression#)(boost::with_lock_guard::args)...)) boost::with_lock_guard(Lockable&amp;, Function&amp;&amp;, Args&amp;&amp; ...) [with Lockable = boost::mutex, Function = void (&amp;)(), Args = ]': ../boost/thread/with_lock_guard.hpp:52: instantiated from here ../boost/thread/with_lock_guard.hpp:56: sorry, unimplemented: mangling template_id_expr </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10159 Trac 1.4.3 viboes Sun, 29 Jun 2014 14:11:43 GMT owner, status changed https://svn.boost.org/trac10/ticket/10159#comment:1 https://svn.boost.org/trac10/ticket/10159#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> <p> This is a gcc bug (See <a class="ext-link" href="http://stackoverflow.com/questions/1989552/gcc-error-with-variadic-templates-sorry-unimplemented-cannot-expand-identi"><span class="icon">​</span>http://stackoverflow.com/questions/1989552/gcc-error-with-variadic-templates-sorry-unimplemented-cannot-expand-identi</a>). </p> <p> I have no time to find a workaround for it. If you could provide a patch I would try to apply it. </p> Ticket viboes Fri, 05 Sep 2014 20:12:57 GMT <link>https://svn.boost.org/trac10/ticket/10159#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10159#comment:2</guid> <description> <p> Hi, could you try this patch? </p> <pre class="wiki">git diff include/boost/thread/future.hpp diff --git a/include/boost/thread/future.hpp b/include/boost/thread/future.hpp index 6443ba9..2c235ea 100644 --- a/include/boost/thread/future.hpp +++ b/include/boost/thread/future.hpp @@ -3866,7 +3866,9 @@ namespace detail { // future&lt;R&gt; async(Executor&amp; ex, F&amp;&amp;, ArgTypes&amp;&amp;...); //////////////////////////////// -#if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +//#if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +#if defined(BOOST_THREAD_PROVIDES_INVOKE) &amp;&amp; ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) &amp;&amp; ! defined(BOOST_NO_CXX11_HDR_TUPLE) + #if defined BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNTION_PTR template &lt;class Executor, class R, class... ArgTypes&gt; </pre> </description> <category>Ticket</category> </item> <item> <author>Niklas Angare <li51ckf02@…></author> <pubDate>Sat, 06 Sep 2014 22:30:21 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10159#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10159#comment:3</guid> <description> <p> The patch got rid of the "cannot expand" errors and so 9-10 more tests pass. I tested it with boost commit b15ca1, thread commit 556bbde. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 07 Sep 2014 07:35:04 GMT</pubDate> <title>milestone changed https://svn.boost.org/trac10/ticket/10159#comment:4 https://svn.boost.org/trac10/ticket/10159#comment:4 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.57.0</span> </li> </ul> <p> Thanks for your quick response. I will close it as soon as this commit is merged to master </p> <p> <a class="ext-link" href="https://github.com/boostorg/thread/commit/e93035ce4211375a040cdb61959ecd8d94e3a941"><span class="icon">​</span>https://github.com/boostorg/thread/commit/e93035ce4211375a040cdb61959ecd8d94e3a941</a> </p> Ticket Niklas Angare <li51ckf02@…> Sun, 07 Sep 2014 13:26:04 GMT <link>https://svn.boost.org/trac10/ticket/10159#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10159#comment:5</guid> <description> <p> The other error still remains though ("sorry, unimplemented: mangling template_id_expr"). About ten tests fail because of it. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Tue, 16 Sep 2014 06:09:19 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10159#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10159#comment:6</guid> <description> <p> <a class="ext-link" href="https://github.com/boostorg/thread/commit/546ca909c4f9c4db847661fba7b6e06bc2b8b097"><span class="icon">​</span>https://github.com/boostorg/thread/commit/546ca909c4f9c4db847661fba7b6e06bc2b8b097</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Tue, 16 Sep 2014 06:15:59 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/10159#comment:7 https://svn.boost.org/trac10/ticket/10159#comment:7 <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