https://github.com/boostorg/json/pull/182
| 147 | |
| 148 | // https://github.com/boostorg/json/pull/182 |
| 149 | void |
| 150 | testPull182() |
| 151 | { |
| 152 | struct other |
| 153 | { |
| 154 | virtual void f() {} |
| 155 | }; |
| 156 | |
| 157 | struct my_resource |
| 158 | : other |
| 159 | , container::pmr::memory_resource |
| 160 | { |
| 161 | void* |
| 162 | do_allocate( |
| 163 | std::size_t, |
| 164 | std::size_t) override |
| 165 | { |
| 166 | return nullptr; |
| 167 | } |
| 168 | |
| 169 | void |
| 170 | do_deallocate( |
| 171 | void*, |
| 172 | std::size_t, |
| 173 | std::size_t) noexcept override |
| 174 | { |
| 175 | } |
| 176 | |
| 177 | bool |
| 178 | do_is_equal( |
| 179 | memory_resource const&) const noexcept override |
| 180 | { |
| 181 | return true; |
| 182 | } |
| 183 | }; |
| 184 | |
| 185 | my_resource mr; |
| 186 | BOOST_TEST(storage_ptr(&mr).get() == &mr); |
| 187 | } |
| 188 | |
| 189 | void |
| 190 | testInitOrder() |
nothing calls this directly
no test coverage detected