Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6624634 authored by Ryan Prichard's avatar Ryan Prichard Committed by Gerrit Code Review
Browse files

Merge "Add InlineStdAllocator::rebind struct member" into main

parents 4061f730 239f4534
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -65,6 +65,17 @@ public:
            free(p);
        }
    }

    // The STL checks that this member type is present so that
    // std::allocator_traits<InlineStdAllocator<T, SIZE>>::rebind_alloc<Other>
    // works. std::vector won't be able to construct an
    // InlineStdAllocator<Other, SIZE>, because InlineStdAllocator has no
    // default constructor, but vector presumably doesn't rebind the allocator
    // because it doesn't allocate internal node types.
    template <class Other>
    struct rebind {
        typedef InlineStdAllocator<Other, SIZE> other;
    };
    Allocation& mAllocation;
};