39 constexpr explicit Dllink(T dat) noexcept :
data{std::move(dat)} {
40 static_assert(
sizeof(
Dllink) <= 24,
"keep this class small");
58 constexpr auto
lock() noexcept ->
void { this->
next =
this; }
65 constexpr auto is_locked() const noexcept ->
bool {
return this->
next ==
this; }
71 constexpr auto detach() noexcept ->
void {
73 const auto n = this->
next;
74 const auto p = this->
prev;
85 constexpr auto attach(
Dllink& node)
noexcept ->
void {
doubly linked node (that may also be a "head" a list)
Definition dllink.hpp:28
constexpr Dllink()=default
Copy construct a new Dllink object (deleted intentionally)
constexpr auto lock() noexcept -> void
lock the node (and don't append it to any list)
Definition dllink.hpp:58
T data
Definition dllink.hpp:32
constexpr Dllink(T dat) noexcept
Construct a new Dllink object.
Definition dllink.hpp:39
constexpr Dllink(Dllink &&) noexcept=default
Dllink * prev
Definition dllink.hpp:31
constexpr auto detach() noexcept -> void
detach from a list
Definition dllink.hpp:71
constexpr auto is_locked() const noexcept -> bool
whether the node is locked
Definition dllink.hpp:65
auto operator=(const Dllink &) -> Dllink &=delete
Dllink * next
Definition dllink.hpp:30
Dllink(const Dllink &)=delete
Iterator for RDllist circular doubly-linked list.
Definition rdllist.hpp:19
Circular doubly-linked list implementation.
Definition rdllist.hpp:55