BNM 2.5.0
 
Loading...
Searching...
No Matches
BNM::ForwardList< T > Struct Template Reference

BNM's custom forward list implementation. More...

#include <Utils.hpp>

Classes

struct  Element
 

Public Member Functions

 ForwardList (const ForwardList &other)
 
ForwardListoperator= (const ForwardList &other)
 
bool IsEmpty () const
 
void Add (T value)
 
void Clear (void(*onElementFreed)(T value)=nullptr)
 

Public Attributes

ElementlastElement {}
 

Detailed Description

template<typename T>
struct BNM::ForwardList< T >

BNM's custom forward list implementation.

Warning
Don't use it anywhere! Internal Only

Almost same as std::forward_list, but works how BNM needs to. Has only pointer to last element, but elements are looped, so last element points to first one. It used internally, so it lacks a lot of C++ stuff like foreach.