21 using namespace folly;
44 EXPECT_EQ(&a, static_cast<const Ptr&>(p).get_nothrow<int>());
46 EXPECT_EQ(&a, static_cast<const Ptr&>(p).get<int>());
47 EXPECT_EQ(static_cast<void*>(
nullptr), p.get_nothrow<
void>());
58 EXPECT_EQ(static_cast<int*>(
nullptr), p.get_nothrow<
int>());
91 EXPECT_EQ(
"const int", static_cast<const Ptr&>(p).
apply(Visitor()));
96 EXPECT_EQ(
"const Foo", static_cast<const Ptr&>(p).
apply(Visitor()));
102 EXPECT_THROW({ p.apply(Visitor()); }, std::invalid_argument);
108 void operator()(
int* ) {
111 void operator()(
const int* ) {
112 result =
"const int";
114 void operator()(Foo* ) {
117 void operator()(
const Foo* ) {
118 result =
"const Foo";
132 static_cast<const Ptr&
>(p).
apply(v);
139 static_cast<const Ptr&
>(p).
apply(v);
#define EXPECT_THROW(statement, expected_exception)
#define EXPECT_EQ(val1, val2)
constexpr detail::Map< Move > move
—— Concurrent Priority Queue Implementation ——
#define EXPECT_TRUE(condition)
decltype(auto) apply_visitor(Visitor &&visitor, const DiscriminatedPtr< Args... > &variant)
#define EXPECT_FALSE(condition)
decltype(auto) constexpr apply(F &&func, Tuple &&tuple)
TEST(SequencedExecutor, CPUThreadPoolExecutor)