siplasplas
A library for C++ reflection and introspection
cpp::features::OStreamable Class Reference

Implements write to an standard output stream. More...

#include <siplasplas/typeerasure/features/iostream.hpp>

Static Public Member Functions

template<typename T >
static std::ostream & apply (std::ostream &os, const T &value) noexcept(cpp::concepts::OStreamable< T >::no_except)
 Implements write to output stream feature. More...
 

Detailed Description

Implements write to an standard output stream.

Member Function Documentation

template<typename T >
static std::ostream& cpp::features::OStreamable::apply ( std::ostream &  os,
const T &  value 
)
inlinestaticnoexcept

Implements write to output stream feature.

OStreamable feature implements write to an output stream in a type agnostic way. If the type is not writable to an standard output stream (See cpp::concepts::OStreamable), it throws a std::runtime_error exception. Else invokes operator<<(std::ostream&, const T& value).

Parameters
osReference to the output stream to write to.
valueValue to write to the output stream.
Returns
Reference to the passed output stream.

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