Bimetric 3+1 toolkit for spherical symmetry
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
sys/slog.h File Reference

Writing both to cerr and cout simultaneously. More...

#include <sys/stat.h>
Include dependency graph for slog.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  SLog
 SLog enables writing both to cerr and cout simultaneously. More...

Functions

template<class T >
SLogoperator<< (SLog &st, T val)

Variables

static SLog slog

Detailed Description

Writing both to cerr and cout simultaneously.

Author:
Mikica Kocic

Definition in file slog.h.


Function Documentation

template<class T >
SLog& operator<< ( SLog st,
val 
)

Definition at line 35 of file slog.h.

{
    if ( st.disabled ) return st;
    std::cerr << val;
    if ( ! st.tty ) std::cout << val;
    return st;
}

Variable Documentation

SLog slog [static]

Definition at line 43 of file slog.h.