| 62 | } |
| 63 | |
| 64 | void deallocate(void* ptr) |
| 65 | { |
| 66 | auto* ucptr = static_cast<unsigned char*>(ptr); |
| 67 | if (std::less_equal<unsigned char*>{}(storage_, ucptr) |
| 68 | && std::less<unsigned char*>{}(ucptr, storage_ + preallocated_)) |
| 69 | { |
| 70 | // Nothing to do. |
| 71 | } |
| 72 | else |
| 73 | { |
| 74 | ::operator delete(ptr); |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | private: |
| 79 | std::size_t preallocated_; |
no test coverage detected