Search:
Login
Help/Guide
About Trac
Preferences
Wiki
Timeline
Roadmap
View Tickets
Search
Context Navigation
Back to Ticket #10793
Ticket #10793
: BOOST_SCOPE_EXIT_ALL.cpp
File BOOST_SCOPE_EXIT_ALL.cpp,
273 bytes
(added by
adam.f.badura@…
,
8 years ago
)
Demonstration program for BOOST_SCOPE_EXIT_ALL
Line
1
#include
<cstdlib>
2
#include
<iostream>
3
#include
<boost/scope_exit.hpp>
4
5
int
main
(
int
argc
,
char
*
argv
[])
{
6
double
var
=
0.0
;
7
8
{
9
BOOST_SCOPE_EXIT_ALL
(
&
)
{
10
var
=
argc
;
11
};
12
13
var
=
10.0
;
14
}
15
16
std
::
cout
<<
var
<<
std
::
endl
;
17
18
return
EXIT_SUCCESS
;
19
}
Download in other formats:
Original Format