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

Commit 651ed13c authored by Ryan Prichard's avatar Ryan Prichard Committed by Automerger Merge Worker
Browse files

Merge "Add InlineStdAllocator::rebind struct member" into main am: e6624634...

Merge "Add InlineStdAllocator::rebind struct member" into main am: e6624634 am: 770c1df5 am: 5b528cf0 am: 8548e36f am: ccff001d

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2673907



Change-Id: I3bfee0e052f0dd2e30ab021db4b978714e0b4c26
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 83ded973 ccff001d
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;
};