template class cv::Allocator

The STL-compilant memory Allocator based on cv::fastMalloc() and cv::fastFree()

#include <cvstd.hpp>

template <typename _Tp>
class Allocator
{
public:
    // typedefs

    typedef const value_type* const_pointer;
    typedef const value_type& const_reference;
    typedef ptrdiff_t difference_type;
    typedef value_type* pointer;
    typedef value_type& reference;
    typedef size_t size_type;
    typedef _Tp value_type;

    // classes

    template <typename U>
    class rebind;

    // construction

    Allocator();
    Allocator(Allocator const&);

    template <typename U>
    Allocator(Allocator<U> const&);

    // methods

    pointer
    address(reference r);

    const_pointer
    address(const_reference r);

    pointer
    allocate(
        size_type count,
        const void* = 0
        );

    void
    construct(
        pointer p,
        const _Tp& v
        );

    void
    deallocate(
        pointer p,
        size_type
        );

    void
    destroy(pointer p);

    size_type
    max_size() const;
};