#pragma once namespace cdc { template struct Link { Link *next; T item; }; template struct LinkIterator { Link *link; inline T& operator*() { return link->item; } inline void operator++() { link = link->next; } inline bool operator!=(LinkIterator const& other) { return link != other.link; } }; template struct SList { Link *head = nullptr; inline void insert(T item) { head = new /*(alloc8)*/ Link{head, item}; } inline LinkIterator begin() { return {head}; } inline LinkIterator end() { return {nullptr}; } }; }