3.1.4. shared_ptr.hpp¶
Full path: allocator/shared_ptr.hpp
-
template<typename
Perm
>
classshared_ptr_allocator
¶ An
Allocator
using reference-counting to guarantee no memory leaks, even whenrelease
is not used correctly.-
explicit
shared_ptr_allocator
(std::size_t n)¶ Construct an allocator that allocates permutations of degree
n
.
-
std::size_t
degree
() const¶
-
pointer
make_identity
()¶ - Returns
std::make_shared<perm>(perm_group::make_identity_perm<perm>(degree()))
-
void
release
(const_pointer p)¶ Does nothing, though at this stage
p
should be the sole reference to the permutation.
-
explicit