Use allocator_traits if available

This commit is contained in:
Victor Zverovich
2018-02-10 06:51:13 -08:00
parent 66b25ef0d0
commit cdfcee27fb
2 changed files with 13 additions and 2 deletions

View File

@@ -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); }
};