Boost C++ Libraries: Ticket #3940: BOOST_SCOPE_EXIT without arguments https://svn.boost.org/trac10/ticket/3940 <p> Why the following code doesn't work ?? </p> <div class="wiki-code"><div class="code"><pre> <span class="n">BOOST_SCOPE_EXIT</span><span class="p">()</span> <span class="p">{</span> <span class="n">puts</span><span class="p">(</span><span class="s">&quot;Exit&quot;</span><span class="p">);</span> <span class="p">}</span> <span class="n">BOOST_SCOPE_EXIT_END</span> </pre></div></div><p> But this does work: </p> <div class="wiki-code"><div class="code"><pre> <span class="kt">int</span> <span class="n">dummy</span><span class="p">;</span> <span class="n">BOOST_SCOPE_EXIT</span><span class="p">(</span> <span class="p">(</span><span class="n">dummy</span><span class="p">)</span> <span class="p">)</span> <span class="p">{</span> <span class="n">puts</span><span class="p">(</span><span class="s">&quot;Exit&quot;</span><span class="p">);</span> <span class="p">}</span> <span class="n">BOOST_SCOPE_EXIT_END</span> </pre></div></div> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3940 Trac 1.4.3 nasonov Wed, 17 Feb 2010 17:51:50 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3940#comment:1 https://svn.boost.org/trac10/ticket/3940#comment:1 <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> Not a bug. According to documentation, empty scope-exit-capture-list is not supported: </p> <p> A <a class="missing wiki">ScopeExit</a> declaration has the following synopsis: </p> <p> #include &lt;boost/scope_exit.hpp&gt; </p> <p> BOOST_SCOPE_EXIT ( scope-exit-capture-list ) </p> <blockquote> <p> function-body </p> </blockquote> <p> BOOST_SCOPE_EXIT_END </p> <p> where </p> <p> scope-exit-capture-list: </p> <blockquote> <p> ( scope-exit-capture ) scope-exit-capture-list ( scope-exit-capture ) </p> </blockquote> <p> scope-exit-capture: </p> <blockquote> <p> identifier &amp;identifier </p> </blockquote> Ticket anonymous Thu, 18 Feb 2010 09:00:14 GMT type changed https://svn.boost.org/trac10/ticket/3940#comment:2 https://svn.boost.org/trac10/ticket/3940#comment:2 <ul> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Feature Requests</span> </li> </ul> <p> Ok. Can you add support for empty sequence, please ? Thank you:) </p> Ticket bruno.uy@… Wed, 23 Nov 2011 12:33:26 GMT status, version, milestone changed; resolution deleted https://svn.boost.org/trac10/ticket/3940#comment:3 https://svn.boost.org/trac10/ticket/3940#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>version</strong> <span class="trac-field-old">Boost 1.42.0</span> → <span class="trac-field-new">Boost 1.48.0</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">wontfix</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.43.0</span> → <span class="trac-field-new">To Be Determined</span> </li> </ul> Ticket