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

Implements read from an standard input stream. More...

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

Static Public Member Functions

template<typename T >
static std::istream & apply (std::istream &is, T &value) noexcept(cpp::concepts::IStreamable< T >::no_except)
 Implements read from input stream feature. More...
 

Detailed Description

Implements read from an standard input stream.

Member Function Documentation

template<typename T >
static std::istream& cpp::features::IStreamable::apply ( std::istream &  is,
T &  value 
)
inlinestaticnoexcept

Implements read from input stream feature.

IStreamable feature implements read from an input stream in a type agnostic way. If the type is not readable from an standard input stream (See cpp::concepts::IStreamable), it throws a std::runtime_error exception. Else invokes operator<<(std::istream&, T&).

Parameters
osReference to the input stream to read from.
valuelvalue reference to the object which the read value will be assigned to.
Returns
Reference to the passed input stream.

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