cycle_ptr
Public Member Functions | Protected Member Functions | Friends | List of all members
cycle_ptr::detail::link< Tag > Class Template Reference

Internally used datastructure for llist. More...

#include <llist.h>

Inheritance diagram for cycle_ptr::detail::link< Tag >:
Inheritance graph
[legend]

Public Member Functions

constexpr link () noexcept=default
 Default constructor.
 
 ~link () noexcept
 Destructor.
 

Protected Member Functions

constexpr link ([[maybe_unused]] const link &other) noexcept
 Constructor. More...
 
constexpr auto operator= ([[maybe_unused]] const link &other) noexcept -> link &
 Assignment. More...
 
constexpr auto linked () const noexcept -> bool
 Test if this is linked into a linked list. More...
 

Friends

template<typename , typename >
class llist
 

Detailed Description

template<typename Tag>
class cycle_ptr::detail::link< Tag >

Internally used datastructure for llist.

The link holds the preceding and successive pointers, to enable implementing a doubly linked list.

The head constructor (selected using llist_head_tag) turns the linked list into a circular list.

Parameters
TagDiscriminant tag.

Constructor & Destructor Documentation

◆ link()

template<typename Tag>
constexpr cycle_ptr::detail::link< Tag >::link ( [[maybe_unused] ] const link< Tag > &  other)
inlineprotectednoexcept

Constructor.

Link pointers are not a property of derived class, so we don't update the owner list.

This constructor exists so that derived classes can have a copy/move constructor defaulted.

Member Function Documentation

◆ linked()

template<typename Tag>
constexpr auto cycle_ptr::detail::link< Tag >::linked ( ) const -> bool
inlineprotectednoexcept

Test if this is linked into a linked list.

Returns
True if this is on a linked list.

◆ operator=()

template<typename Tag>
constexpr auto cycle_ptr::detail::link< Tag >::operator= ( [[maybe_unused] ] const link< Tag > &  other) -> link&
inlineprotectednoexcept

Assignment.

Link pointers are not a property of derived class, so we don't update the owner list.

This method exists so that derived classes can have a copy/move assignment defaulted.


The documentation for this class was generated from the following file: