2
0
mirror of https://github.com/boostorg/leaf.git synced 2026-02-09 11:12:37 +00:00

warnings, compile errors

This commit is contained in:
Emil Dotchevski
2019-01-09 23:05:18 -08:00
parent 6e466d8ce3
commit 4f8e4d032a
2 changed files with 5 additions and 0 deletions

View File

@@ -9,6 +9,7 @@
#include <boost/leaf/detail/dynamic_store.hpp>
#include <boost/leaf/throw.hpp>
#include <memory>
#define LEAF_AUTO(v,r) auto _r_##v = r; if( !_r_##v ) return _r_##v.error(); auto & v = *_r_##v
#define LEAF_CHECK(r) {auto _r = r; if( !_r ) return _r.error();}

View File

@@ -47,6 +47,10 @@ namespace boost { namespace leaf {
{
return ss.handle_error(get_error(ex), &ex, std::forward<Handlers>(handlers)..., [ ]() -> typename leaf_detail::function_traits<TryBlock>::return_type { throw; });
}
catch( ... )
{
return ss.handle_error(next_error_value(), 0, std::forward<Handlers>(handlers)..., [ ]() -> typename leaf_detail::function_traits<TryBlock>::return_type { throw; });
}
}
namespace leaf_detail