dune-common  2.11
Public Member Functions | Public Attributes | Friends | List of all members
Dune::ExceptionStream< E > Class Template Reference

Class for extending a Dune::Exception with a stream interface. More...

#include <dune/common/exceptions.hh>

Inheritance diagram for Dune::ExceptionStream< E >:
Inheritance graph

Public Member Functions

 ExceptionStream (const E &other)
 
 ExceptionStream (E &&other)
 
template<class T >
 requires (requires(std::ostringstream &oss, T t) { oss<< t;} and not std::is_integral_v< T >) friend ExceptionStream &operator<<(ExceptionStream &es
 Stream operator for l-value ExceptionStream and lvalue-reference. More...
 
es message (es.sstream_.str())
 
template<class T >
 requires (requires(std::ostringstream &oss, T t) { oss<< t;} and not std::is_integral_v< T >) friend ExceptionStream operator<<(ExceptionStream &&es
 Stream operator for r-value ExceptionStream and lvalue-reference. More...
 
return std::move (es)
 

Public Attributes

const T & t
 
return es
 

Friends

template<class T >
requires std::is_integral_v< T > friend ExceptionStreamoperator<< (ExceptionStream &es, T t)
 Stream operator for l-value ExceptionStream and integral values. More...
 
template<class T >
requires std::is_integral_v< T > friend ExceptionStream operator<< (ExceptionStream &&es, T t)
 Stream operator for r-value ExceptionStream and integral values. More...
 
ExceptionStreamoperator<< (ExceptionStream &es, std::ostream &(*t)(std::ostream &))
 Stream operator for l-value ExceptionStream and io manipulator. More...
 
ExceptionStream operator<< (ExceptionStream &&es, std::ostream &(*t)(std::ostream &))
 Stream operator for r-value ExceptionStream and io manipulator. More...
 

Detailed Description

template<class E>
class Dune::ExceptionStream< E >

Class for extending a Dune::Exception with a stream interface.

Template Parameters
EException base class, should be derived from Dune::Exception.

The class ExceptionStream<E> derives from E and extends it by an operator<<(ExceptionStream<T>,T). The latter is available whenever a corresponding operator<< for std::ostringstream is available. All values fed into the stream will be forwarded to the message stored E.


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