]>
Commit | Line | Data |
---|---|---|
20effc67 TL |
1 | // Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc. |
2 | ||
3 | // Distributed under the Boost Software License, Version 1.0. (See accompanying | |
4 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
5 | ||
6 | #include <boost/leaf/handle_errors.hpp> | |
7 | #include <boost/exception/info.hpp> | |
8 | ||
9 | namespace leaf = boost::leaf; | |
10 | ||
11 | struct test_ex: std::exception { }; | |
12 | ||
13 | typedef boost::error_info<struct test_info_, int> test_info; | |
14 | ||
15 | int main() | |
16 | { | |
17 | leaf::try_catch( | |
18 | [] | |
19 | { | |
20 | }, | |
21 | []( test_info const & x ) // boost::error_info must be taken by value | |
22 | { | |
23 | } ); | |
24 | ||
25 | return 0; | |
26 | } |