mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-02 15:11:43 +01:00
Use allocator_traits if available
This commit is contained in:
@@ -78,7 +78,9 @@ class AllocatorRef {
|
||||
|
||||
Allocator *get() const { return alloc_; }
|
||||
|
||||
value_type* allocate(std::size_t n) { return alloc_->allocate(n); }
|
||||
value_type* allocate(std::size_t n) {
|
||||
return fmt::internal::allocate(*alloc_, n);
|
||||
}
|
||||
void deallocate(value_type* p, std::size_t n) { alloc_->deallocate(p, n); }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user