1#ifndef UTOPIA_CORE_OSTREAM_HH
2#define UTOPIA_CORE_OSTREAM_HH
16template <
typename T,
typename U >
20 out <<
"(" <<
pair.first <<
", " <<
pair.second <<
")";
33std::enable_if_t< is_container_v< T >, std::ostream& >
42 out << std::setprecision(16) <<
"[";
71 out <<
"[]" << std::endl;
98template <
template <
typename,
typename,
typename... >
class MapType,
103 is_associative_container_v< MapType< Key, Value, Args... > > or
104 is_unordered_associative_container_v< MapType< Key, Value, Args... > >,
106operator<<(std::ostream& out, const MapType< Key, Value, Args... >& map)
115 for (auto it = map.begin();
116 it != std::next(map.begin(), map.size() - 1);
121 out << *std::next(map.begin(), map.size() - 1) << "]";
133template < typename... Types >
135operator<<(std::ostream& ostr, std::tuple< Types... > tuple)
137 std::string val_str("(");
139 auto report_val = [&val_str](auto&& val) {
140 val_str += std::to_string(val) + ", ";
142 boost::hana::for_each(tuple, report_val);
145 val_str.erase(val_str.end() - 2);
162template < typename T >
Container select_entities(const Manager &mngr, const DataIO::Config &sel_cfg)
Select entities according to parameters specified in a configuration.
Definition select.hh:213
Definition metaprogramming.hh:43
std::ostream & operator<<(std::ostream &out, const std::pair< T, U > &pair)
pretty print a pair
Definition ostream.hh:18
Definition parallel.hh:235