| 34 | |
| 35 | namespace 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 | |
| 79 | template<class promise_type> |
nothing calls this directly
no outgoing calls
no test coverage detected