MCPcopy Create free account
hub / github.com/David-Haim/concurrencpp / callable_inlining_tester

Class callable_inlining_tester

test/source/tests/task_tests.cpp:36–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34
35namespace concurrencpp::tests {
36 struct callable_inlining_tester {
37 struct not_movable {
38 not_movable(const not_movable&) {}
39
40 void operator()() {}
41 };
42
43 struct not_noexcept_movable {
44 not_noexcept_movable(not_noexcept_movable&&) {}
45
46 void operator()() {}
47 };
48
49 struct noexcept_movable_big {
50 const char buffer[concurrencpp::details::task_constants::buffer_size + 1] = {};
51
52 noexcept_movable_big(noexcept_movable_big&&) noexcept {}
53
54 void operator()() {}
55 };
56
57 struct inlinable {
58 char buffer[concurrencpp::details::task_constants::buffer_size];
59
60 inlinable(inlinable&&) noexcept {}
61
62 void operator()() {}
63 };
64
65 static_assert(!concurrencpp::details::callable_vtable<not_movable>::is_inlinable(),
66 "callable_vtable<...>::is_inlinable - callable_vtable deduced un-inlinable functor is inlinable.");
67
68 static_assert(!concurrencpp::details::callable_vtable<not_noexcept_movable>::is_inlinable(),
69 "callable_vtable<...>::is_inlinable - callable_vtable deduced un-inlinable functor is inlinable.");
70
71 static_assert(!concurrencpp::details::callable_vtable<noexcept_movable_big>::is_inlinable(),
72 "callable_vtable<...>::is_inlinable - callable_vtable deduced un-inlinable functor is inlinable.");
73
74 static_assert(concurrencpp::details::callable_vtable<inlinable>::is_inlinable(),
75 "callable_vtable<...>::is_inlinable - callable_vtable deduced inlinable functor is *NOT* inlinable.");
76 };
77} // namespace concurrencpp::tests
78
79template<class promise_type>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected