Functions
StdHelpers.hpp File Reference

Defines helper functions for the standard library. More...

#include <array>
#include <chrono>
#include <cstdio>
#include <ctime>
#include <deque>
#include <list>
#include <map>
#include <memory>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#include "Utilities/PrintHelpers.hpp"
#include "Utilities/Requires.hpp"
#include "Utilities/StlStreamDeclarations.hpp"
#include "Utilities/TypeTraits.hpp"

Go to the source code of this file.

Functions

template<typename T >
std::ostreamoperator<< (std::ostream &os, const std::list< T > &v)
 Output the items of a std::list.
 
template<typename T >
std::ostreamoperator<< (std::ostream &os, const std::vector< T > &v)
 Output the items of a std::vector.
 
template<typename T >
std::ostreamoperator<< (std::ostream &os, const std::deque< T > &v)
 Output the items of a std::deque.
 
template<typename T , size_t N>
std::ostreamoperator<< (std::ostream &os, const std::array< T, N > &a)
 Output the items of a std::array.
 
template<typename... Args>
std::ostreamoperator<< (std::ostream &os, const std::tuple< Args... > &t)
 Stream operator for tuples.
 
template<typename K , typename V , typename H >
std::ostreamoperator<< (std::ostream &os, const std::unordered_map< K, V, H > &m)
 Output all the key, value pairs of a std::unordered_map.
 
template<typename K , typename V , typename C >
std::ostreamoperator<< (std::ostream &os, const std::map< K, V, C > &m)
 Output all the key, value pairs of a std::map.
 
template<typename T >
std::ostreamoperator<< (std::ostream &os, const std::unordered_set< T > &v)
 Output the items of a std::unordered_set.
 
template<typename T , typename C >
std::ostreamoperator<< (std::ostream &os, const std::set< T, C > &v)
 Output the items of a std::set.
 
template<typename T , Requires< tt::is_streamable< std::ostream, T >::value > >
std::ostreamoperator<< (std::ostream &os, const std::unique_ptr< T > &t)
 Stream operator for std::unique_ptr.
 
template<typename T , Requires< tt::is_streamable< std::ostream, T >::value > >
std::ostreamoperator<< (std::ostream &os, const std::shared_ptr< T > &t)
 Stream operator for std::shared_ptr.
 
template<typename T , typename U >
std::ostreamoperator<< (std::ostream &os, const std::pair< T, U > &t)
 Stream operator for std::pair.
 
template<typename K , typename V , typename H >
std::string keys_of (const std::unordered_map< K, V, H > &m)
 Construct a string containing the keys of a std::unordered_map.
 
template<typename K , typename V , typename C >
std::string keys_of (const std::map< K, V, C > &m)
 Construct a string containing the keys of a std::map.
 
template<typename... Args>
std::string formatted_string (const std::string &fmt, Args... args)
 Format a string like printf. More...
 
std::string current_date_and_time ()
 Get the current date and time.
 

Detailed Description

Defines helper functions for the standard library.