3
3
4
4
#include < system_error>
5
5
6
- #include < outcome/config.hpp>
7
- #include < outcome/std_result.hpp>
8
- #include < outcome/success_failure.hpp>
9
- #include < outcome/try.hpp>
6
+ #include < boost/ outcome/config.hpp>
7
+ #include < boost/ outcome/std_result.hpp>
8
+ #include < boost/ outcome/success_failure.hpp>
9
+ #include < boost/ outcome/try.hpp>
10
10
11
11
namespace ystdlib ::error_handling {
12
12
/* *
@@ -20,14 +20,14 @@ namespace ystdlib::error_handling {
20
20
* @tparam ErrorType The type used to represent errors.
21
21
*/
22
22
template <typename ReturnType, typename ErrorType = std::error_code>
23
- using Result = OUTCOME_V2_NAMESPACE ::std_result<ReturnType, ErrorType>;
23
+ using Result = BOOST_OUTCOME_V2_NAMESPACE ::std_result<ReturnType, ErrorType>;
24
24
25
25
/* *
26
26
* @return A value indicating successful completion of a function that returns a void result (i.e.,
27
27
* `Result<void, E>`).
28
28
*/
29
- [[nodiscard]] inline auto success () -> OUTCOME_V2_NAMESPACE ::success_type<void> {
30
- return OUTCOME_V2_NAMESPACE ::success ();
29
+ [[nodiscard]] inline auto success () -> BOOST_OUTCOME_V2_NAMESPACE ::success_type<void> {
30
+ return BOOST_OUTCOME_V2_NAMESPACE ::success ();
31
31
}
32
32
33
33
/* *
@@ -43,9 +43,9 @@ using Result = OUTCOME_V2_NAMESPACE::std_result<ReturnType, ErrorType>;
43
43
* NOTE: This macro is only supported on GCC and Clang due to reliance on compiler-specific
44
44
* extensions.
45
45
*/
46
- #ifdef OUTCOME_TRYX
46
+ #ifdef BOOST_OUTCOME_TRYX
47
47
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
48
- #define YSTDLIB_ERROR_HANDLING_TRYX (expr ) OUTCOME_TRYX (expr)
48
+ #define YSTDLIB_ERROR_HANDLING_TRYX (expr ) BOOST_OUTCOME_TRYX (expr)
49
49
#endif
50
50
51
51
/* *
@@ -60,7 +60,7 @@ using Result = OUTCOME_V2_NAMESPACE::std_result<ReturnType, ErrorType>;
60
60
* - Otherwise, execution continues normally.
61
61
*/
62
62
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
63
- #define YSTDLIB_ERROR_HANDLING_TRYV (expr ) OUTCOME_TRYV (expr)
63
+ #define YSTDLIB_ERROR_HANDLING_TRYV (expr ) BOOST_OUTCOME_TRYV (expr)
64
64
} // namespace ystdlib::error_handling
65
65
66
66
#endif // YSTDLIB_ERROR_HANDLING_RESULT_HPP
0 commit comments