| 31 | namespace stl { |
| 32 | |
| 33 | class BadAlloc : public std::bad_alloc { |
| 34 | public: |
| 35 | explicit BadAlloc(Status st) noexcept : st_(std::move(st)) {} |
| 36 | |
| 37 | const char* what() const noexcept override { return st_.message().c_str(); } |
| 38 | |
| 39 | protected: |
| 40 | Status st_; |
| 41 | }; |
| 42 | |
| 43 | /// \brief A STL allocator delegating allocations to a Arrow MemoryPool |
| 44 | template <class T> |