Support Class Library
A set of tools providing classes and utility
basic.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <iostream>
4 #include <utility>
6 
7 namespace scl{
8  namespace tools{
9  namespace iostream{
10  namespace log{
15  template <class T=std::string>
16  inline decltype(std::cout)& log(T&& value){
17  return std::cout << std::forward<T>(value) << nl;
18  }
19 
24  template <class T=std::string>
25  inline decltype(std::cerr)& error(T&& value){
26  return std::cerr << std::forward<T>(value) << '\n';
27  }
28  }
29  }
30  }
31 }
decltype(std::cerr) & error(T &&value)
Output a value on stderr and terminate with a line break.
Definition: basic.h:25
Global namespace of the SCL.
Definition: alias.hpp:3
std::basic_ostream< Char, Traits > & nl(std::basic_ostream< Char, Traits > &os)
An alternative for std::endl that actually does what you assumed std::endl was doing.
Definition: nl.h:14
decltype(std::cout) & log(T &&value)
Output a value on stdout and terminate with a line break.
Definition: basic.h:16