forked from lix-project/lix
Fix tests on systems with a non-master git defaultBranch #1
|
@ -105,6 +105,7 @@ libutil_headers = files(
|
|||
'regex-combinators.hh',
|
||||
'regex.hh',
|
||||
'repair-flag.hh',
|
||||
'result.hh',
|
||||
'serialise.hh',
|
||||
'shlex.hh',
|
||||
'signals.hh',
|
||||
|
|
24
src/libutil/result.hh
Normal file
24
src/libutil/result.hh
Normal file
|
@ -0,0 +1,24 @@
|
|||
#pragma once
|
||||
/// @file
|
||||
|
||||
#include <boost/outcome/std_outcome.hpp>
|
||||
#include <boost/outcome/std_result.hpp>
|
||||
#include <boost/outcome/success_failure.hpp>
|
||||
#include <exception>
|
||||
|
||||
namespace nix {
|
||||
|
||||
template<typename T, typename E = std::exception_ptr>
|
||||
using Result = boost::outcome_v2::std_result<T, E>;
|
||||
|
||||
template<typename T, typename D, typename E = std::exception_ptr>
|
||||
using Outcome = boost::outcome_v2::std_outcome<T, D, E>;
|
||||
|
||||
namespace result {
|
||||
|
||||
using boost::outcome_v2::success;
|
||||
using boost::outcome_v2::failure;
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue