Go to the source code of this file.
Definition at line 48 of file EnableSharedFromThisTest.cpp.
References folly::pushmi::__adl::noexcept(), and test_enable_shared_from_this().
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()),
"");
requires E e noexcept(noexcept(s.error(std::move(e))))
static void test_enable_shared_from_this(std::shared_ptr< C > sp)
template<typename C >
static void test_enable_shared_from_this |
( |
std::shared_ptr< C > |
sp | ) |
|
|
static |
Definition at line 23 of file EnableSharedFromThisTest.cpp.
References ASSERT_EQ, ASSERT_THROW, ASSERT_TRUE, and C.
Referenced by TEST().
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());
#define ASSERT_EQ(val1, val2)
#define ASSERT_THROW(statement, expected_exception)
#define ASSERT_TRUE(condition)