Classes | Public Types | Public Member Functions | List of all members
StackList< T > Class Template Reference

StackList is a container for a list which elements exist only on the stack. More...

#include "StackList.h"

Classes

class  StackListIterator
 

Public Types

using TStackListEntry = StackListEntry< T >
 

Public Member Functions

 StackList ()=default
 
void push (TStackListEntry &entry) noexcept
 
T * pop () noexcept
 
T & back () noexcept
 
constexpr bool empty () const noexcept
 
constexpr StackListIterator begin () noexcept
 
constexpr TStackListEntryend () noexcept
 

Detailed Description

template<typename T>
class StackList< T >

StackList is a container for a list which elements exist only on the stack.

The purpose is to keep allocation with new and delete away as long as stack seems to be available. The class is range based for loop ready. To use it a class needs to derive from StackListEntry.

Example:

// class Foo : public StackListEntry<Foo> {...};

Definition at line 24 of file StackList.h.

Member Typedef Documentation

◆ TStackListEntry

template<typename T >
using StackList< T >::TStackListEntry = StackListEntry<T>

Definition at line 27 of file StackList.h.

Constructor & Destructor Documentation

◆ StackList()

template<typename T >
StackList< T >::StackList ( )
default

Member Function Documentation

◆ back()

template<typename T >
T& StackList< T >::back ( )
inlinenoexcept

Definition at line 67 of file StackList.h.

Referenced by clang::insights::ScopeHandler::RemoveCurrentScope().

◆ begin()

template<typename T >
constexpr StackListIterator StackList< T >::begin ( )
inlineconstexprnoexcept

Definition at line 101 of file StackList.h.

◆ empty()

template<typename T >
constexpr bool StackList< T >::empty ( ) const
inlineconstexprnoexcept

Definition at line 69 of file StackList.h.

Referenced by clang::insights::CfrontCodeGenerator::InsertArg().

◆ end()

template<typename T >
constexpr TStackListEntry* StackList< T >::end ( )
inlineconstexprnoexcept

Definition at line 102 of file StackList.h.

◆ pop()

template<typename T >
T* StackList< T >::pop ( )
inlinenoexcept

◆ push()

template<typename T >
void StackList< T >::push ( TStackListEntry entry)
inlinenoexcept

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