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 , 13 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |
comment:2 by , 13 years ago
| Type: | Bugs → Feature Requests |
|---|
Ok. Can you add support for empty sequence, please ? Thank you:)
comment:3 by , 11 years ago
| Milestone: | Boost 1.43.0 → To Be Determined |
|---|---|
| Resolution: | wontfix |
| Status: | closed → reopened |
| Version: | Boost 1.42.0 → Boost 1.48.0 |
Note:
See TracTickets
for help on using tickets.

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 )
BOOST_SCOPE_EXIT_END
where
scope-exit-capture-list:
scope-exit-capture: