Opened 13 years ago

Last modified 11 years ago

#3940 reopened Feature Requests

BOOST_SCOPE_EXIT without arguments

Reported by: anonymous Owned by: nasonov
Milestone: To Be Determined Component: scope_exit
Version: Boost 1.48.0 Severity: Problem
Keywords: Cc:

Description

Why the following code doesn't work ??

BOOST_SCOPE_EXIT()
{
  puts("Exit");
} BOOST_SCOPE_EXIT_END

But this does work:

int dummy;
BOOST_SCOPE_EXIT( (dummy) )
{
  puts("Exit");
} BOOST_SCOPE_EXIT_END

Change History (3)

comment:1 by nasonov, 13 years ago

Resolution: wontfix
Status: newclosed

Not a bug. According to documentation, empty scope-exit-capture-list is not supported:

A ScopeExit declaration has the following synopsis:

#include <boost/scope_exit.hpp>

BOOST_SCOPE_EXIT ( scope-exit-capture-list )

function-body

BOOST_SCOPE_EXIT_END

where

scope-exit-capture-list:

( scope-exit-capture ) scope-exit-capture-list ( scope-exit-capture )

scope-exit-capture:

identifier &identifier

comment:2 by anonymous, 13 years ago

Type: BugsFeature Requests

Ok. Can you add support for empty sequence, please ? Thank you:)

comment:3 by bruno.uy@…, 11 years ago

Milestone: Boost 1.43.0To Be Determined
Resolution: wontfix
Status: closedreopened
Version: Boost 1.42.0Boost 1.48.0
Note: See TracTickets for help on using tickets.