Class holding two instances of type T
and allows to switch them.
More...
#include <eagine/double_buffer.hpp>
Public Member Functions | |
double_buffer ()=default | |
Default constructor. | |
double_buffer (const T &initial) | |
Constructor setting the initial value for both buffers. | |
void | swap () noexcept |
Swaps the front and the back buffers. More... | |
auto | front () noexcept -> T & |
Returns a reference to the current "front" instance. | |
auto | front () const noexcept -> const T & |
Returns a const reference to the current "front" instance. | |
auto | back () noexcept -> T & |
Returns a reference to the current "back" instance. | |
auto | back () const noexcept -> const T & |
Returns a const reference to the current "back" instance. | |
Class holding two instances of type T
and allows to switch them.
|
inlinenoexcept |