Changeset 4525 for icGREP/icgrep-devel


Ignore:
Timestamp:
Feb 27, 2015, 12:34:19 PM (5 years ago)
Author:
nmedfort
Message:

Fix for slab allocator on Mac OS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/slab_allocator.h

    r4510 r4525  
    55
    66template <typename T>
    7 class SlabAllocator : public std::allocator<T> {
     7class SlabAllocator {
    88public:
    99
     
    2222    };
    2323
    24     inline pointer allocate(size_type n) noexcept {
     24    inline pointer allocate(size_type n, const_pointer = nullptr) noexcept {
    2525        return reinterpret_cast<pointer>(mAllocator.Allocate(n * sizeof(T), sizeof(T)));
    2626    }
     
    4545    inline bool operator!=(SlabAllocator<T> const&) { return false; }
    4646
    47     inline SlabAllocator() {}
    48     inline SlabAllocator(const SlabAllocator &) {}
    49     inline ~SlabAllocator() { release_memory(); }
     47    inline SlabAllocator() noexcept {}
     48    inline SlabAllocator(const SlabAllocator &) noexcept {}
     49    template <class U> inline SlabAllocator (const std::allocator<U>&) noexcept {}
     50    inline ~SlabAllocator() { }
    5051
    5152private:
Note: See TracChangeset for help on using the changeset viewer.