22 using namespace folly;
32 enum class Type { Bad, Badder, Baddest };
36 constexpr Err(
Type type) : type_(type) {}
39 Err(Err
const&) =
default;
41 Err& operator=(Err
const&) =
default;
42 Err& operator=(Err&&) =
default;
45 return a.type_ == b.type_;
48 return a.type_ != b.type_;
51 static constexpr Err bad() {
54 static constexpr Err badder() {
57 static constexpr Err baddest() {
72 return std::make_unique<int>(int(x + y));
87 #if FOLLY_HAS_COROUTINES 91 auto x = co_await f1();
93 auto y = co_await f2(
x);
95 auto z = co_await f3(
x,
y);
105 auto x = co_await f1();
106 auto y = co_await f2(
x);
107 auto z = co_await f4(
x,
y, Err::badder());
118 auto x = co_await
throws();
#define EXPECT_THROW(statement, expected_exception)
#define EXPECT_EQ(val1, val2)
—— Concurrent Priority Queue Implementation ——
bool operator!=(const Unexpected< Error > &lhs, const Unexpected< Error > &rhs)
constexpr Unexpected< typename std::decay< Error >::type > makeUnexpected(Error &&)
#define EXPECT_TRUE(condition)
bool operator==(const Unexpected< Error > &lhs, const Unexpected< Error > &rhs)
#define EXPECT_FALSE(condition)
TEST(SequencedExecutor, CPUThreadPoolExecutor)