]>
Commit | Line | Data |
---|---|---|
1e59de90 | 1 | // Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc. |
20effc67 TL |
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/leaf/result.hpp> | |
8 | ||
9 | namespace leaf = boost::leaf; | |
10 | ||
11 | int main() | |
12 | { | |
13 | return leaf::try_handle_all( | |
14 | []() -> leaf::result<int> | |
15 | { | |
16 | return 0; | |
17 | }, | |
18 | []( int && ) // && arguments are not allowed | |
19 | { | |
20 | return 1; | |
21 | }, | |
22 | [] | |
23 | { | |
24 | return 2; | |
25 | }); | |
26 | return 0; | |
27 | } |