37 #if (defined(__cplusplus) && __cplusplus >= 201402L) || ((defined(_MSVC_LANG) && _MSVC_LANG >= 201402L))
38 static_assert(std::is_trivially_constructible<test_trivial_clazz>::value &&
39 std::is_trivially_copyable<test_trivial_clazz>::value,
41 #elif (defined(__cplusplus) && __cplusplus >= 201103L) || ((defined(_MSVC_LANG) && _MSVC_LANG >= 201103L))
42 static_assert(std::is_trivial<test_trivial_clazz>::value,
"trivial check");
46 copp::future::poller<void> p1;
49 copp::future::poller<void> p2(123);
53 std::unique_ptr<bool> param3 = std::unique_ptr<bool>(
new bool(
false));
54 copp::future::poller<void> p3(std::move(param3));
58 copp::future::poller<void> p4;
66 copp::future::poller<test_trivial_clazz> p1;
69 copp::future::poller<test_trivial_clazz> p2(123);
73 std::unique_ptr<test_trivial_clazz> param3 = std::unique_ptr<test_trivial_clazz>(
new test_trivial_clazz(234));
74 copp::future::poller<test_trivial_clazz> p3(std::move(param3));
82 copp::future::poller<test_trivial_clazz> p5(456, 456);
88 copp::future::poller<int> p1;
91 copp::future::poller<int> p2(123);
95 std::unique_ptr<int> param3 = std::unique_ptr<int>(
new int(234));
96 copp::future::poller<int> p3(std::move(param3));
102 typedef copp::future::poller<test_no_trivial_parent_clazz> test_poll_type;
116 typedef copp::future::poller<test_no_trivial_parent_clazz, std::shared_ptr<test_no_trivial_parent_clazz> >
127 test_poll_type p3(std::make_shared<test_no_trivial_parent_clazz>(234));
137 test_poll_type p5(std::make_shared<test_no_trivial_child_clazz>(456));
146 copp::future::poller<void> p1;
147 copp::future::poller<void> p2;
166 copp::future::poller<int> p1;
167 copp::future::poller<int> p2;
187 copp::future::poller<test_no_trivial_parent_clazz> p1;
188 copp::future::poller<test_no_trivial_parent_clazz> p2;
190 p1 = copp::future::make_unique<test_no_trivial_parent_clazz>(123);
208 copp::future::result_type<test_no_trivial_parent_clazz, int> p1 =
209 copp::future::result_type<test_no_trivial_parent_clazz, int>::create_success(123);
210 copp::future::result_type<test_no_trivial_parent_clazz, int> p2 =
211 copp::future::result_type<test_no_trivial_parent_clazz, int>::create_error(456);
229 copp::future::result_type<int, int> p1 = copp::future::result_type<int, int>::create_success(123);
230 copp::future::result_type<int, int> p2 = copp::future::result_type<int, int>::create_error(456);
246 copp::future::future<void> fut;
253 fut.reset_data(
true);
259 copp::future::future<int32_t> fut;
260 int32_t simulator_result = 12345678;
267 fut.reset_data(simulator_result);
275 copp::future::future<std::string> fut;
282 fut.reset_data(
"hello");
290 using result_type = copp::future::result_type<int, long>;
293 copp::future::future<result_type> fut;
300 fut.reset_data(result_type::make_success(171));
308 using result_type = copp::future::result_type<int, std::string>;
311 copp::future::future<result_type> fut;
318 fut.reset_data(result_type::make_error(
"hello"));
CASE_TEST(future, poll_void)
void swap(intrusive_ptr< T > &lhs, intrusive_ptr< T > &rhs)
test_no_trivial_child_clazz(int a)
test_no_trivial_child_clazz()
virtual ~test_no_trivial_child_clazz()
test_no_trivial_parent_clazz(int a)
virtual ~test_no_trivial_parent_clazz()
test_no_trivial_parent_clazz()
test_trivial_clazz()=default
test_trivial_clazz(int a)
test_trivial_clazz(int a, int)
#define CASE_EXPECT_FALSE(c)
#define CASE_EXPECT_EQ(l, r)
#define CASE_EXPECT_TRUE(c)
#define COPP_IS_TIRVIALLY_COPYABLE_V(X)