| 72 | |
| 73 | template <typename T> |
| 74 | struct no_allocate_allocator { |
| 75 | using value_type = T; |
| 76 | using size_type = size_t; |
| 77 | using pointer = value_type*; |
| 78 | using const_pointer = const value_type*; |
| 79 | |
| 80 | no_allocate_allocator() = default; |
| 81 | template <typename O> |
| 82 | no_allocate_allocator(no_allocate_allocator<O>) { |
| 83 | } |
| 84 | |
| 85 | template <typename M> |
| 86 | struct rebind { |
| 87 | typedef no_allocate_allocator<M> other; |
| 88 | }; |
| 89 | |
| 90 | pointer allocate(size_type, void const* = nullptr) { |
| 91 | EXPECT_TRUE(false); |
| 92 | return nullptr; |
| 93 | } |
| 94 | |
| 95 | void deallocate(pointer, size_type) { |
| 96 | FAIL(); |
| 97 | } |
| 98 | }; |
| 99 | |
| 100 | TEST(regression_tests, can_take_capacity_obj) { |
| 101 | fu2::function_base<true, true, fu2::capacity_can_hold<trash_obj>, false, true, |
nothing calls this directly
no outgoing calls
no test coverage detected