libbmb
Modern implementation of STL
Loading...
Searching...
No Matches
llist_nodes.h
Go to the documentation of this file.
1#pragma once
8#include "utils/move.h"
9
10namespace bmb {
11namespace llist {
12
13struct BaseNode {
14 BaseNode* next = nullptr;
15};
16
17template <typename T>
18struct Node : BaseNode {
19 // Enales construction of `val` from
20 // given args
21 template <typename... Args>
23 : val(forward<Args>(args)...) {}
24
26};
27
28} // namespace llist
29} // namespace bmb
Definition algo_base.h:14
constexpr T && forward(remove_ref_t< T > &value) noexcept
Forward a lvalue.
Definition move.h:33
Definition llist_nodes.h:13
BaseNode * next
Definition llist_nodes.h:14
Definition llist_nodes.h:18
T val
Definition llist_nodes.h:25
Node(Args &&... args)
Definition llist_nodes.h:22