Miscellaneous [#CLICKHOUSE-2]

This commit is contained in:
Alexey Milovidov 2018-02-21 22:35:10 +03:00
parent 84354195f9
commit f36dfe42a5
2 changed files with 32 additions and 2 deletions

View File

@ -5,8 +5,6 @@
#include <common/likely.h>
#include <double-conversion/double-conversion.h>
#include <common/iostream_debug_helpers.h>
/** Methods for reading floating point numbers from text with decimal representation.
* There are "precise", "fast" and "simple" implementations.

View File

@ -74,6 +74,14 @@ ostream & operator<<(ostream & stream, const map<K, V> & what)
return stream;
}
template <typename K, typename V>
ostream & operator<<(ostream & stream, const multimap<K, V> & what)
{
stream << "multimap(size = " << what.size() << ")";
dumpContainer(stream, what);
return stream;
}
template <typename K, typename V>
ostream & operator<<(ostream & stream, const unordered_map<K, V> & what)
{
@ -82,6 +90,14 @@ ostream & operator<<(ostream & stream, const unordered_map<K, V> & what)
return stream;
}
template <typename K, typename V>
ostream & operator<<(ostream & stream, const unordered_multimap<K, V> & what)
{
stream << "unordered_multimap(size = " << what.size() << ")";
dumpContainer(stream, what);
return stream;
}
template <typename K>
ostream & operator<<(ostream & stream, const set<K> & what)
{
@ -90,6 +106,14 @@ ostream & operator<<(ostream & stream, const set<K> & what)
return stream;
}
template <typename K>
ostream & operator<<(ostream & stream, const multiset<K> & what)
{
stream << "multiset(size = " << what.size() << ")";
dumpContainer(stream, what);
return stream;
}
template <typename K>
ostream & operator<<(ostream & stream, const unordered_set<K> & what)
{
@ -98,6 +122,14 @@ ostream & operator<<(ostream & stream, const unordered_set<K> & what)
return stream;
}
template <typename K>
ostream & operator<<(ostream & stream, const unordered_multiset<K> & what)
{
stream << "unordered_multiset(size = " << what.size() << ")";
dumpContainer(stream, what);
return stream;
}
template <typename K>
ostream & operator<<(ostream & stream, const list<K> & what)
{