FE 0.6.0
A header-only C++ library for writing frontends
Loading...
Searching...
No Matches
fe::Ring< T, 2 > Class Template Reference

Specialization if N == 2; doesn't need a ring, we just copy. More...

#include <fe/ring.h>

Public Member Functions

Construction
 Ring (std::initializer_list< T > list)
 
 Ring () noexcept=default
 
 Ring (const Ring &)=default
 
 Ring (Ring &&other) noexcept
 
Ringoperator= (Ring other) noexcept
 
Access
T & front ()
 
const T & front () const
 
T & operator[] (size_t i)
 
const T & operator[] (size_t i) const
 
Modifiers
void reset ()
 
put (T item)
 

Friends

void swap (Ring &r1, Ring &r2) noexcept
 

Detailed Description

template<class T>
class fe::Ring< T, 2 >

Specialization if N == 2; doesn't need a ring, we just copy.

Definition at line 117 of file ring.h.

Constructor & Destructor Documentation

◆ Ring() [1/4]

template<class T >
fe::Ring< T, 2 >::Ring ( std::initializer_list< T > list)
inline

Definition at line 121 of file ring.h.

◆ Ring() [2/4]

template<class T >
fe::Ring< T, 2 >::Ring ( )
defaultnoexcept

◆ Ring() [3/4]

template<class T >
fe::Ring< T, 2 >::Ring ( const Ring< T, 2 > & )
default

◆ Ring() [4/4]

template<class T >
fe::Ring< T, 2 >::Ring ( Ring< T, 2 > && other)
inlinenoexcept

Definition at line 124 of file ring.h.

References fe::Ring< T, N >::swap.

Member Function Documentation

◆ front() [1/2]

template<class T >
T & fe::Ring< T, 2 >::front ( )
inline

Definition at line 133 of file ring.h.

◆ front() [2/2]

template<class T >
const T & fe::Ring< T, 2 >::front ( ) const
inline

Definition at line 134 of file ring.h.

◆ operator=()

template<class T >
Ring & fe::Ring< T, 2 >::operator= ( Ring< T, 2 > other)
inlinenoexcept

Definition at line 128 of file ring.h.

References fe::Ring< T, N >::swap.

◆ operator[]() [1/2]

template<class T >
T & fe::Ring< T, 2 >::operator[] ( size_t i)
inline

Definition at line 135 of file ring.h.

References assert_unused.

◆ operator[]() [2/2]

template<class T >
const T & fe::Ring< T, 2 >::operator[] ( size_t i) const
inline

Definition at line 139 of file ring.h.

References assert_unused.

◆ put()

template<class T >
T fe::Ring< T, 2 >::put ( T item)
inline

Definition at line 148 of file ring.h.

◆ reset()

template<class T >
void fe::Ring< T, 2 >::reset ( )
inline

Definition at line 147 of file ring.h.

Friends And Related Symbol Documentation

◆ swap

template<class T >
void swap ( Ring< T, 2 > & r1,
Ring< T, 2 > & r2 )
friend

Definition at line 156 of file ring.h.


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