/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// Adapts an AllocPolicy into a C++ standard allocator, suitable for use in STL // containers. These containers don't support OOM handling, so this allocator // will crash on OOM. // // Note: this requires the allocator to overload operator==. This should return // true only if the storage allocated by one allocator can be deallocated // through another. This is always the case for stateless allocators. template <typename T, typename AllocPolicy> struct PolicyAllocator : private AllocPolicy { using value_type = T; using size_type = std::size_t; using difference_type = std::ptrdiff_t;
template <typename U, typename AP> friendstruct PolicyAllocator;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.