1#ifndef IPFS_EXPECTED_H_
2#define IPFS_EXPECTED_H_
9#if __has_include("base/types/expected.h")
10#include "base/types/expected.h"
12template <
class Value,
class Error>
13using expected = base::expected<Value, Error>;
15using unexpected = base::unexpected<Error>;
17#elif __has_cpp_attribute(__cpp_lib_expected)
21template <
class Value,
class Error>
22using expected = std::expected<Value, Error>;
24using unexpected = std::unexpected<Error>;
27#elif __has_include(<boost/outcome.hpp>)
32#include <boost/outcome.hpp>
34template <
class Value,
class Error>
35using expected = boost::outcome_v2::checked<Value, Error>;
37using unexpected = Error;
41#error Get an expected implementation