
10 Oct
2012
10 Oct
'12
10:31 p.m.
10.10.2012 23:47, Evgeny Panasyuk пишет:
I have just checked Boost.ScopeExit on-line manual (http://www.boost.org/doc/libs/1_51_0/libs/scope_exit/doc/html/index.html). Approximately 14 of 16 BOOST_SCOPE_EXIT* samples in manual are in fact emulations of SCOPE_FAILURE and SCOPE_SUCCESS.
Yes, SCOPE_FAILURE seems to be useful. But could you please provide an use case for the SCOPE_SUCCESS? It seems to me that it is better to place SUCCESS code at the end of the scope. Note also that the exceptions cannot be thrown from the SCOPE_SUCCESS. -- Best regards, Sergey Cheban