Utopia  2
Framework for studying models of complex & adaptive systems.
Namespaces | Functions
ostream.hh File Reference
#include "type_traits.hh"
Include dependency graph for ostream.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Utopia
 
 Utopia::Utils
 

Functions

template<typename T , typename U >
std::ostream & Utopia::Utils::operator<< (std::ostream &out, const std::pair< T, U > &pair)
 pretty print a pair More...
 
template<class T >
std::enable_if_t< is_container_v< T >, std::ostream & > Utopia::Utils::operator<< (std::ostream &out, const T &container)
 
std::ostream & Utopia::Utils::operator<< (std::ostream &out, const std::vector< bool > &container)
 Output container to stream 'out'- specialization for vector of booleans. Note that a vector of booleans is not the same as a vector of any other type because it does some storage optimization to make booleans take up single bits only. More...
 
template<template< typename, typename, typename... > class MapType, typename Key , typename Value , typename... Args>
std::enable_if_t< is_associative_container_v< MapType< Key, Value, Args... > > or is_unordered_associative_container_v< MapType< Key, Value, Args... > >, std::ostream & > Utopia::Utils::operator<< (std::ostream &out, const MapType< Key, Value, Args... > &map)
 Output (unordered) associative containers to an std::ostream. More...
 
template<typename... Types>
std::ostream & Utopia::Utils::operator<< (std::ostream &ostr, std::tuple< Types... > tuple)
 Report a tuple to an outstream, This works by piping the single elements inside the tuple to the stream, and therefor requires operator<< for the underlying types to be defined. More...
 
template<typename T >
std::string Utopia::Utils::str (T &&t)
 Turn any object for which operator<< exists into a string. Mostly useful for logging data via spdlog which for instance cannot log containers per default. More...