3.1.3. raw_ptr.hpp

Full path: allocator/raw_ptr.hpp

template<typename Perm>
class raw_ptr_allocator

An Allocator than uses new and delete for allocating permutations.

using perm = Perm
using pointer = perm*
using const_pointer = const perm*
explicit raw_ptr_allocator(std::size_t n)

Construct an allocator that allocates permutations of degree n.

std::size_t degree() const
pointer make()
Returns

new perm(perm_group::make_perm<perm>(degree()))

pointer make_identity()
Returns

new perm(perm_group::make_identity_perm<perm>(degree()))

template<typename UPerm>
pointer copy(UPerm &&p)
Returns

new perm(perm_group::copy_perm<perm>(n, std::forward<UPerm>(p)))

void release(const_pointer p)

Does delete p.