20 using namespace folly;
27 std::shared_ptr<C> sp2 = sp->shared_from_this();
31 std::weak_ptr<C> wp = sp->weak_from_this();
41 #if __cplusplus >= 201700L || __GLIBCXX__ >= 20150123L 43 ASSERT_THROW(stack_resident.shared_from_this(), std::bad_weak_ptr);
44 ASSERT_TRUE(stack_resident.weak_from_this().expired());
50 class C_std :
public std::enable_shared_from_this<C_std> {};
53 noexcept(std::declval<C_std>().shared_from_this()) ==
54 noexcept(std::declval<C_folly>().shared_from_this()),
57 noexcept(std::declval<C_std const>().shared_from_this()) ==
58 noexcept(std::declval<C_folly const>().shared_from_this()),
60 static_assert(
noexcept(std::declval<C_folly>().weak_from_this()),
"");
61 static_assert(
noexcept(std::declval<C_folly const>().weak_from_this()),
"");
#define ASSERT_EQ(val1, val2)
—— Concurrent Priority Queue Implementation ——
requires E e noexcept(noexcept(s.error(std::move(e))))
static void test_enable_shared_from_this(std::shared_ptr< C > sp)
#define ASSERT_THROW(statement, expected_exception)
#define ASSERT_TRUE(condition)
TEST(SequencedExecutor, CPUThreadPoolExecutor)