Toolbox snapshot
The Reactive C++ Toolbox
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
toolbox::util::StreamInserter< OStreamT, FnT > Class Template Reference

#include <toolbox/util/StreamInserter.hpp>

Public Member Functions

 StreamInserter (FnT fn)
 
 ~StreamInserter ()=default
 
 StreamInserter (const StreamInserter &)=delete
 
StreamInserteroperator= (const StreamInserter &)=delete
 
 StreamInserter (StreamInserter &&) noexcept=default
 
StreamInserteroperator= (StreamInserter &&) noexcept=delete
 

Friends

OStreamToperator<< (OStreamT &os, const StreamInserter &si)
 

Detailed Description

template<typename OStreamT, typename FnT>
requires std::invocable<FnT, OStreamT&>
class toolbox::util::StreamInserter< OStreamT, FnT >

StreamInserter is a class template designed to simplify I/O manipulator and stream inserter implementations by reducing boiler-plate code.

Definition at line 31 of file StreamInserter.hpp.

Constructor & Destructor Documentation

◆ StreamInserter() [1/3]

template<typename OStreamT , typename FnT >
toolbox::util::StreamInserter< OStreamT, FnT >::StreamInserter ( FnT  fn)
inlineexplicit

Definition at line 39 of file StreamInserter.hpp.

◆ ~StreamInserter()

◆ StreamInserter() [2/3]

◆ StreamInserter() [3/3]

template<typename OStreamT , typename FnT >
toolbox::util::StreamInserter< OStreamT, FnT >::StreamInserter ( StreamInserter< OStreamT, FnT > &&  )
defaultnoexcept

Member Function Documentation

◆ operator=() [1/2]

◆ operator=() [2/2]

Friends And Related Symbol Documentation

◆ operator<<

template<typename OStreamT , typename FnT >
OStreamT & operator<< ( OStreamT os,
const StreamInserter< OStreamT, FnT > &  si 
)
friend

Definition at line 32 of file StreamInserter.hpp.


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