Boost C++ Libraries: Ticket #12543: boost::async compile error for -std=c++03 and c++98 https://svn.boost.org/trac10/ticket/12543 <p> Following code results in compile error on GCC and Clang with -std=c++03 or -std=c++98 flags. </p> <div class="wiki-code"><div class="code"><pre><span class="cp">#include</span> <span class="cpf">&lt;boost/thread.hpp&gt;</span><span class="cp"></span> <span class="k">struct</span> <span class="n">Calc</span> <span class="p">{</span> <span class="k">typedef</span> <span class="kt">int</span> <span class="n">result_type</span><span class="p">;</span> <span class="n">result_type</span> <span class="nf">operator</span><span class="p">()()</span> <span class="k">const</span> <span class="p">{</span> <span class="k">return</span> <span class="n">result_type</span><span class="p">();</span> <span class="p">}</span> <span class="p">};</span> <span class="kt">int</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span> <span class="n">Calc</span> <span class="n">x</span><span class="p">;</span> <span class="n">boost</span><span class="o">::</span><span class="n">async</span><span class="p">(</span><span class="n">x</span><span class="p">);</span> <span class="p">}</span> </pre></div></div><p> LIVE DEMO: coliru.stacked-crooked.com/a/532c22d37e951a28 </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12543 Trac 1.4.3 viboes Fri, 04 Nov 2016 00:03:19 GMT <link>https://svn.boost.org/trac10/ticket/12543#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12543#comment:1</guid> <description> <p> Have you tried defining BOOST_THREAD_VERSION 4? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Fri, 04 Nov 2016 00:12:27 GMT</pubDate> <title>owner changed https://svn.boost.org/trac10/ticket/12543#comment:2 https://svn.boost.org/trac10/ticket/12543#comment:2 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">viboes</span> </li> </ul> Ticket viboes Fri, 30 Dec 2016 01:33:45 GMT <link>https://svn.boost.org/trac10/ticket/12543#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12543#comment:3</guid> <description> <p> PING !!! </p> </description> <category>Ticket</category> </item> <item> <author>evgeny.panasyuk@…</author> <pubDate>Fri, 30 Dec 2016 19:30:27 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12543#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12543#comment:4</guid> <description> <p> There is no error with this definition (on both GCC and Clang): coliru.stacked-crooked.com/a/a459a8fbce3c009a </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Tue, 03 Jan 2017 06:48:43 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12543#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12543#comment:5</guid> <description> <p> Thanks for the report. </p> <p> I don't know what to do. BOOST_THREAD_VERSION 2 contains a lot of limitation that were solved by BOOST_THREAD_VERSION 3 and 4. </p> </description> <category>Ticket</category> </item> <item> <author>evgeny.panasyuk@…</author> <pubDate>Mon, 16 Jan 2017 20:16:38 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12543#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12543#comment:6</guid> <description> <p> Perhaps newer BOOST_THREAD_VERSION should be set by default? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 29 Jan 2017 16:16:10 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12543#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12543#comment:7</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/12543#comment:6" title="Comment 6">evgeny.panasyuk@…</a>: </p> <blockquote class="citation"> <p> Perhaps newer BOOST_THREAD_VERSION should be set by default? </p> </blockquote> <p> No. This will introduce breaking changes. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 29 Jan 2017 16:16:43 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/12543#comment:8 https://svn.boost.org/trac10/ticket/12543#comment:8 <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">worksforme</span> </li> </ul> Ticket